Commit Graph

169 Commits

Author SHA1 Message Date
iposva@google.com 26d59247df - Pass the correct version of handle reference to Class::NewNativeWrapper.
Review URL: https://chromiumcodereview.appspot.com//10827434

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11012 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 02:49:46 +00:00
iposva@google.com 99d563982c - Support for patching of class methods and fields.
Review URL: https://chromiumcodereview.appspot.com//10827288

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10616 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 00:38:01 +00:00
hausner@google.com 9b47d131bf Support new getter syntax (no formal parameter list)
Support both new and old getter syntax in the VM compiler.
One co19 test becomes invalid, as it expects a compile error
due to missing getter formal parameters.
Review URL: https://chromiumcodereview.appspot.com//10837208

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10541 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 22:53:34 +00:00
asiva@google.com d4d781d636 - Unify class ids and snapshot object ids list so that we don't have disparate
and sometimes confusing values.
- Remove instance_kind_ field from RawClass.
- Rename all class id names to have a Cid suffix.
- Remove code from object.h and object_store.h which dealt with object ids
  of predefined classes for snapshots.
Review URL: https://chromiumcodereview.appspot.com//10827209

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 19:46:23 +00:00
turnidge@google.com 2d70c7a5eb Improve the stack trace output to be more readable.
BEFORE

Unhandled exception:
MyException
 0. Function: '::baz' url: 'file:///Users/turnidge/dart/bug.dart' line:2 col:3
 1. Function: '_OtherClass@11f7ef14._OtherClass@11f7ef14._named@11f7ef14' url: 'file:///Users/turnidge/dart/bug.dart' line:7 col:8
 2. Function: '::set:globalVar' url: 'file:///Users/turnidge/dart/bug.dart' line:12 col:3
 3. Function: '::_bar@11f7ef14' url: 'file:///Users/turnidge/dart/bug.dart' line:16 col:3
 4. Function: 'MyClass.get:field' url: 'file:///Users/turnidge/dart/bug.dart' line:25 col:9
 5. Function: 'MyClass.fooHelper' url: 'file:///Users/turnidge/dart/bug.dart' line:30 col:7
 6. Function: 'MyClass.foo' url: 'file:///Users/turnidge/dart/bug.dart' line:32 col:14
 7. Function: 'MyClass.function' url: 'file:///Users/turnidge/dart/bug.dart' line:21 col:15
 8. Function: 'MyClass.MyClass.' url: 'file:///Users/turnidge/dart/bug.dart' line:21 col:18
 9. Function: '::function' url: 'file:///Users/turnidge/dart/bug.dart' line:38 col:10
 10. Function: '::main' url: 'file:///Users/turnidge/dart/bug.dart' line:38 col:24

AFTER

Unhandled exception:
MyException
#0      baz (file:///Users/turnidge/dart/bug.dart:2:3)
#1      _OtherClass._OtherClass._named (file:///Users/turnidge/dart/bug.dart:7:8)
#2      globalVar= (file:///Users/turnidge/dart/bug.dart:12:3)
#3      _bar (file:///Users/turnidge/dart/bug.dart:16:3)
#4      MyClass.field (file:///Users/turnidge/dart/bug.dart:25:9)
#5      MyClass.foo.fooHelper (file:///Users/turnidge/dart/bug.dart:30:7)
#6      MyClass.foo (file:///Users/turnidge/dart/bug.dart:32:14)
#7      MyClass.MyClass.<anonymous closure> (file:///Users/turnidge/dart/bug.dart:21:15)
#8      MyClass.MyClass (file:///Users/turnidge/dart/bug.dart:21:18)
#9      main.<anonymous closure> (file:///Users/turnidge/dart/bug.dart:38:10)
#10     main (file:///Users/turnidge/dart/bug.dart:38:24)
Review URL: https://chromiumcodereview.appspot.com//10826191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10408 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 17:22:26 +00:00
rmacnak@google.com a3468803c5 Made it possible to distinguish between a method or top-level function and the
function for a closure defined in such. Addresses issue 4337.
Review URL: https://chromiumcodereview.appspot.com//10831165

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10266 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:56:21 +00:00
turnidge@google.com 2803d78dfd Change the zone allocation api.
Instead of passing a size in bytes to the allocation function, we now
have a templatized Alloc function:

  zone->Alloc<Type>(len)

This is better for security, as we can check for integer overflow in
the size computation before performing the allocation.  Before, we
often failed to check this.
Review URL: https://chromiumcodereview.appspot.com//10836061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10254 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 21:51:44 +00:00
turnidge@google.com 4288220bb2 The null tests that I added for Dart_NewString{8,16,32} were too restrictive.
It is okay to pass NULL codepoints if the length is zero.

This should fix the issue we were seeing in dartium.
Review URL: https://chromiumcodereview.appspot.com//10829153

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10204 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 23:56:16 +00:00
nweiz@google.com 637f6fe616 Fix the definition of kIllegalPort in dart_api.h.
Declaring a variable directly in a header will cause C to be unable to link
multiple object files that both include that header, even if that variable is
const.

Review URL: https://chromiumcodereview.appspot.com//10834017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10135 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:47:33 +00:00
turnidge@google.com 8b68d343c7 Enforce length/size limits for variable size heap object in order to
avoid overflow.

For each variable size heap object, compute the maximum number of
elements and use that in the ::New functions to avoid overflow.  If a
bad length/size reaches a ::New function, that is a FATAL error -- the
problem should have been caught earlier by the dart api or by the
library code.

Add "border guards" in the dart api and in library calls which cause
new variable size heap objects to be allocated.  We check for invalid
length/size and throw explanatory error messages.
Review URL: https://chromiumcodereview.appspot.com//10782016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10130 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:22:30 +00:00
rmacnak@google.com 407f371e3b Added Dart_FunctionEnclosingClassOrLibrary.
Review URL: https://chromiumcodereview.appspot.com//10834096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10096 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 22:47:52 +00:00
turnidge@google.com a3a73029f0 Consolidate a few fields in RawFunction using bitfields.
Remove kAbstract from the list of function kinds.  It now has its own
dedicated bit.  This allows us to distinguish abstract methods from
abstract getters and setters.
Review URL: https://chromiumcodereview.appspot.com//10796004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10087 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 21:26:28 +00:00
cshapiro@google.com d11bc69870 Rename WeakReference to WeakReferenceSet.
This makes room for naming other weak reference types.

Review URL: https://chromiumcodereview.appspot.com//10824053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9970 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 23:52:20 +00:00
rmacnak@google.com 6d56bfd545 Added a test of Dart_FunctionParameterCounts against a closure inside of an
instance method. It currently gives the wrong answer for the fixed parameter
count because the closure's function is identified as non-static => instance
=> one implicit parameter (receiver) in Function::NumberOfImplicitParameters.
Review URL: https://chromiumcodereview.appspot.com//10831021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9956 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 18:30:40 +00:00
cshapiro@google.com 772a399cab Emit symbol maps for compiled code for use by the Linux perf tool.
Review URL: https://chromiumcodereview.appspot.com//10831005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9922 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 00:21:25 +00:00
rmacnak@google.com 99ad7f4170 Added ClosureMirror to dart:mirrors. Added Dart_ClosureFunction to the
embedding API. ClosureMirrors currently implement answering the closure's
function and applying the closure.
Review URL: https://chromiumcodereview.appspot.com//10800065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9860 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:59:12 +00:00
asiva@google.com ec7f44f025 Create frequently used symbols in the vm isolate
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +00:00
asiva@google.com ef67b96777 Rename some of the enum definitions inside classes to avoid conflict with the ObjectKind enum.
Review URL: https://chromiumcodereview.appspot.com//10808064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9792 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 22:24:49 +00:00
rmacnak@google.com 3d1c598ed5 Add a limited version of ParameterMirrors that can only tell whether they are
optional. Add Dart_FunctionParameterCounts. Drop passing isSimpleValue to
instance mirrors: they can compute this on the Dart-side.
Review URL: https://chromiumcodereview.appspot.com//10778005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9683 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 22:05:16 +00:00
regis@google.com a7b85ecff8 Provide better error message when passing wrong number of arguments.
Review URL: https://chromiumcodereview.appspot.com//10695137

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9602 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 17:46:55 +00:00
turnidge@google.com 22fb45f640 Implement method and variable reflection in dart:mirrors.
Review URL: https://chromiumcodereview.appspot.com//10687004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9493 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 23:57:08 +00:00
regis@google.com d95cbc8d7f Use VM type cast and save handles.
Review URL: https://chromiumcodereview.appspot.com//10693071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9317 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:42:53 +00:00
turnidge@google.com a45c6255ba Add Dart_CurrentIsolateData().
Review URL: https://chromiumcodereview.appspot.com//10690027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9228 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 21:28:12 +00:00
turnidge@google.com 3f940819a7 Add a callback to inform embedders when an isolate is being shut down.
Review URL: https://chromiumcodereview.appspot.com//10450016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9211 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 18:15:17 +00:00
cshapiro@google.com 2f3f42e3dc Check that the C string passed to Dart_NewString is valid UTF-8.
BUG=2663

Review URL: https://chromiumcodereview.appspot.com//10584044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8942 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 22:09:20 +00:00
cshapiro@google.com dcaf11db96 Implement a heap profiler for the Dart managed heap.
This profiler will write binary HPROF data to a user provided stream that
can later be viewed by tools such as the Eclipse Memory Analyzer.

While all user defined types are accurately described in the profile data,
internal types that are not self-describing appear as empty objects.  This
will be addressed by a future change.

Review URL: https://chromiumcodereview.appspot.com//10452006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8636 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 00:08:07 +00:00
iposva@google.com e1c28d7adf - Remove trailing '\n' when getting the API error message.
Review URL: https://chromiumcodereview.appspot.com//10539133

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8608 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 14:47:33 +00:00
turnidge@google.com 312702a5ac Second local mirrors CL.
Implement a few chunks of new mirror functionality.  Many changes, notably:

- Added currentIsolateMirror() to provide non-async access to the
  local isolate mirror.

- Added mirrorOf(o) to provide access to local instance mirrors.

- Fleshed out InstanceMirror, InterfaceMirror, and LibraryMirror to
  various degrees.

- Added the MirroredError hierarchy, which lets the user handle Dart
  errors of various sorts from invocation, etc.

- Introduce lazy resolvers for interface mirrors and library mirrors.
  These allow us to build the self-referential library/interface
  hierarchy without going mad.

- Added better toStrings all around.

- Extended the isolate_mirror_local_test to cover new functionality.

Other changes that were required or seemed prudent:

- Exposed the error hierarchy to the embedder.  They need to be able
  to distinguish different error types in some situations.  Improved
  the documetation around error handles and error propagation.

- Added new functions to the dart embedding api as required.  Added
  tests for all new dart api functions.
Review URL: https://chromiumcodereview.appspot.com//10538043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8575 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:07:49 +00:00
fschneider@google.com 84027c4457 Add flow graph printing into a .cfg file with flag --print-flow-graph-file.
This CL adds a flag --print-flow-graph-file which produces one
.cfg-file per isolate when enabled. Currently it prints the final
flow graph before code generation.

I also added SuccessorAt and SuccessorCount to allow easy iteration
over the successors of a basic block.
Review URL: https://chromiumcodereview.appspot.com//10446116

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8322 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 11:09:02 +00:00
vegorov@google.com dc45a91a4e Avoid reading RawObject::class_ directly in the runtime.
Instead rely on tags_ and perform lookups through isolate's class table where appropriately.

R=iposva@google.com

Review URL: https://chromiumcodereview.appspot.com//10444091

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8244 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-04 10:29:00 +00:00
hausner@google.com 0c66cef0d9 Bigger stepping granularity in debugging
- Single step now steps to a safe point on the next line.
- Step into no longer steps into library code.
- Each library has a flag that specifies whether one
  can step into its code.

Later I will add an API to set the per-library flag. Currently
it's set to true for the top-level library and to false for
all other libraries.
Review URL: https://chromiumcodereview.appspot.com//10442088

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8173 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 20:17:34 +00:00
iposva@google.com bee192cbe4 - Rename class index to class id.
- Remove unused method.
Review URL: https://chromiumcodereview.appspot.com//10441111

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8148 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 12:41:37 +00:00
turnidge@google.com ec36e02c28 Remove the partially completed code for remote IsolateMirrors and
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.

Removed old mirror tests and added two new mirror tests.

Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.

Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.

Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.

Added tests for new dart embedding api functionality.

Added the ability to determine if a port is local to the current isolate.

Extended NotImplementedException to accept an optional string
argument.  I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:07:19 +00:00
turnidge@google.com 30452c3c82 Fix Dart_New so that it works with List.
Specifically, when some interface "I" declares a default class "C",
that class "C" may either implement or not implement "I".  It turns
out that the name lookup is supposed to be different in these two
cases.  Before I only handled one of these cases correctly.

Also, it turns out I was passing bogus parameters to factory constructors.
I was supposed to pass type arguments, but instead I was passing the
wrong thing.  Fixed this.

This should fix issue 2971.
Review URL: https://chromiumcodereview.appspot.com//10441034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8072 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 18:00:45 +00:00
turnidge@google.com 6d0932f0b2 Make Dart_GetClass work for private classes.
Review URL: https://chromiumcodereview.appspot.com//10433003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7926 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 21:54:00 +00:00
turnidge@google.com 05b5d44b0e spawnUri. Take two. This time I'll wait for Anton before committing :-).
See original change 7756 for description.
Review URL: https://chromiumcodereview.appspot.com//10407042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7917 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 18:32:51 +00:00
asiva@google.com 2a25dbda09 Fix some dart api functions to use the proper unwrap patterns.
Review URL: https://chromiumcodereview.appspot.com//10411038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7824 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-21 21:41:49 +00:00
turnidge@google.com 76d4586dea Revert my last change.
Review URL: https://chromiumcodereview.appspot.com//10332257

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7757 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:35:04 +00:00
turnidge@google.com 6a8c82db83 Implement spawnUri from dart:isolate. This function allows us to
launch an isolate running a different script.  Finally.

Reviewers: This isn't as hard to review as it looks.  Dive right in!

Siggi: Take a look at my test status file changes and make sure I'm
excluding the right stuff.

Much of the churn in the CL comes from moving ownership of the
import_map.  It used to be set per-library and is now set per-isolate.
This caused a lot of superficial diffs.

DART EMBEDDING API CHANGES:

- Dart_IsolateCreateCallback now takes a script_uri and main argument
  instead of a name_prefix argument.  The script_uri argument allows
  the callback to launch different scripts.  The main argument is used
  in creating the isolate debug name.

- Dart_CreateIsolate now takes script_uri and main arguments.  These
  are used to build the isolate's debug name.

- Dart_LibraryTagHandler, Dart_LoadScript, and Dart_LoadLibrary no
  longer take an import_map.

- Added Dart_SetImportMap.

- Added Dart_RootLibrary to provide access to the root library for the
  current isolate.

OTHER STUFF

Add a couple of tests for spawnUri -- the existing tests assume that
scripts end in a .js suffix which isn't going to work out for us.

Changed how the debug name for isolates get built a bit.

Refactored bin/main.cc a bit.  Fixed some problems with error handling
while creating isolates.

Minor refactoring in builtin.dart to always pass is_windows rather
than relying on it being squirreled away.
Review URL: https://chromiumcodereview.appspot.com//10386107

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7756 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 18:22:10 +00:00
turnidge@google.com 6448b9af52 Dart_IsSame -> Dart_IdentityEquals.
Use return value for the equality result.  Made function more
efficient by avoiding a DARTSCOPE.
Review URL: https://chromiumcodereview.appspot.com//10196003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7664 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-15 18:34:58 +00:00
turnidge@google.com ff9fdf11b2 Speed up the Dart_IsBlah functions by checking the class index. This
allows us to avoid creating handles (and therefore handle scopes) in
these functions.

Before:
UseDartApi : 66395

After:
UseDartApi : 42730

Main improvement comes from speeding up Dart_IsError.
Review URL: https://chromiumcodereview.appspot.com//10386060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7619 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 17:58:59 +00:00
asiva@google.com 4f105f9d0b Resubmit change 7506.
Review URL: https://chromiumcodereview.appspot.com//10387061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7511 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:17:37 +00:00
asiva@google.com 6911f88b25 Revert change 7506 to check on build failure.
Review URL: https://chromiumcodereview.appspot.com//10386073

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7508 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:36:06 +00:00
asiva@google.com 3e5d8216c3 Fix issue 2888.
Allow for the library tag handler to be setup for the isolate, instead of
while loading a script. This ensures that we can use #import on the boot strap libraries like builtin, uri etc.

This change results in a dart API change and corresponding modifications are
necessary in dartium and App Engine.
Review URL: https://chromiumcodereview.appspot.com//10302020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7506 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:25:47 +00:00
antonm@google.com 0ccc21fc5a Fix Mac build.
TBR=iposva@google.com

Review URL: https://chromiumcodereview.appspot.com//10388075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7503 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:06:00 +00:00
cshapiro@google.com 1472427af8 Revert "Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.""
This reverts commit 63480a81fccbde001494dd535cd06a8fa02ed261.

Review URL: https://chromiumcodereview.appspot.com//10379018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7352 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:16:09 +00:00
cshapiro@google.com 3a14326da4 Revert "Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays."
This reverts commit 747dbeaa8f9c0dc1f49d6d6a369c6a3fe2d8b7c9.

Review URL: https://chromiumcodereview.appspot.com//10375007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7313 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 05:28:10 +00:00
cshapiro@google.com 537010ea16 Implement {Int,Uint}{8,16,32,64} and Float{32,64} typed arrays.
Internal and external representations of each array are provided.  A
single interface type implementing the ByteArray and List interfaces
is shared among the internal and external implementation type.

Review URL: https://chromiumcodereview.appspot.com//9958046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7311 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 05:12:19 +00:00
cshapiro@google.com 7ac663acc8 Fix two semantic errors from my previous check-in.
TBR=asiva

Review URL: https://chromiumcodereview.appspot.com//10343010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7261 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 22:48:02 +00:00
cshapiro@google.com 3a40c3eec6 Do not externalize Dart strings as C strings for "print()".
Dart strings with embedded '\0' characters cannot be faithfully
represented as a C string.

This change adds Dart_StringToBytes to the Dart API.  This function
converts a Dart string to array of UTF-8 code units and returns a
length.  Builtin::PrintString now calls Dart_StringToBytes instead of
Dart_StringToCString and, for I/O, fwrite is called instead of fprintf
with the string format specifier.

BUG=1098

Review URL: https://chromiumcodereview.appspot.com//10306002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7260 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 22:40:48 +00:00