Skip to content

Instantly share code, notes, and snippets.

@adam-singer
Created February 20, 2012 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-singer/1871415 to your computer and use it in GitHub Desktop.
Save adam-singer/1871415 to your computer and use it in GitHub Desktop.
Dartium Math.pow not implemented
Dartium throws exception when trying to use Math.pow.
-----------------------------
FIXME:1Exception: IntegerImplementation.pow not implemented
Stack Trace: 0. Function: 'IntegerImplementation.pow' url: 'bootstrap_impl' line:1581 col:5
1. Function: 'MathNatives.pow' url: 'bootstrap_impl' line:1889 col:23
2. Function: 'Math.pow' url: 'bootstrap' line:1994 col:57
3. Function: 'DartiumBug.run' url: 'file:///Users/adam/dart/DartiumBug/DartiumBug.dart' line:9 col:21
4. Function: '::main' url: 'file:///Users/adam/dart/DartiumBug/DartiumBug.dart' line:20 col:23
-----------------------------
Chromium 19.0.1044.0 (Developer Build 122251)
OS Mac OS X
WebKit 535.21 (Source/WebCore/Configurations@175)
JavaScript V8 3.9.6.1
DartVM r4342
Flash 11.1.102.55
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1044.0 (Dart) Safari/535.21
Command Line /Users/adam/Documents/DartEditor/dart/dart-sdk/Chromium.app/Contents/MacOS/Chromium --remote-debugging-port=9222 --user-data-dir=/Users/adam/.dartChromeSettings --bwsi --no-first-run --no-default-browser-check --no-process-singleton-dialog --flag-switches-begin --flag-switches-end file:/Users/adam/dart/DartiumBug/DartiumBug.html
Executable Path /Users/adam/Documents/DartEditor/dart/dart-sdk/Chromium.app/Contents/MacOS/Chromium
Profile Path /Users/adam/.dartChromeSettings/Default
#import('dart:html');
class DartiumBug {
DartiumBug() {
}
void run() {
num n = Math.pow(10, 4);
write("n = ${n}");
}
void write(String message) {
// the HTML library defines a global "document" variable
document.query('#status').innerHTML = message;
}
}
void main() {
new DartiumBug().run();
}
<html>
<head>
<title>DartiumBug</title>
</head>
<body>
<h1>DartiumBug</h1>
<h2 id="status">dart is not running</h2>
<script type="application/dart" src="DartiumBug.dart"></script>
<script src="http://dart.googlecode.com/svn/branches/bleeding_edge/dart/client/dart.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment