Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: runtime/vm/object.cc

Issue 8676001: Implement type checking of list literals (issue 220). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/literal_map_factory.dart ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/assert.h" 8 #include "vm/assert.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 10 matching lines...) Expand all
21 #include "vm/ic_data.h" 21 #include "vm/ic_data.h"
22 #include "vm/object_store.h" 22 #include "vm/object_store.h"
23 #include "vm/parser.h" 23 #include "vm/parser.h"
24 #include "vm/runtime_entry.h" 24 #include "vm/runtime_entry.h"
25 #include "vm/scopes.h" 25 #include "vm/scopes.h"
26 #include "vm/timer.h" 26 #include "vm/timer.h"
27 #include "vm/unicode.h" 27 #include "vm/unicode.h"
28 28
29 namespace dart { 29 namespace dart {
30 30
31 DEFINE_FLAG(bool, expose_core_impl, false,
32 "Enables access to core implementation library (only for testing).");
33 DEFINE_FLAG(bool, generate_gdb_symbols, false, 31 DEFINE_FLAG(bool, generate_gdb_symbols, false,
34 "Generate symbols of generated dart functions for debugging with GDB"); 32 "Generate symbols of generated dart functions for debugging with GDB");
35 33
36 cpp_vtable Object::handle_vtable_ = 0; 34 cpp_vtable Object::handle_vtable_ = 0;
37 cpp_vtable Smi::handle_vtable_ = 0; 35 cpp_vtable Smi::handle_vtable_ = 0;
38 36
39 // These are initialized to a value that will force a illegal memory access if 37 // These are initialized to a value that will force a illegal memory access if
40 // they are being used. 38 // they are being used.
41 #if defined(RAW_NULL) 39 #if defined(RAW_NULL)
42 #error RAW_NULL should not be defined. 40 #error RAW_NULL should not be defined.
(...skipping 4120 matching lines...) Expand 10 before | Expand all | Expand 10 after
4163 result.set_native_entry_resolver(NULL); 4161 result.set_native_entry_resolver(NULL);
4164 result.raw_ptr()->corelib_imported_ = true; 4162 result.raw_ptr()->corelib_imported_ = true;
4165 result.raw_ptr()->load_state_ = RawLibrary::kAllocated; 4163 result.raw_ptr()->load_state_ = RawLibrary::kAllocated;
4166 result.InitClassDictionary(); 4164 result.InitClassDictionary();
4167 result.InitImportList(); 4165 result.InitImportList();
4168 result.InitImportedIntoList(); 4166 result.InitImportedIntoList();
4169 if (import_core_lib) { 4167 if (import_core_lib) {
4170 Library& core_lib = Library::Handle(Library::CoreLibrary()); 4168 Library& core_lib = Library::Handle(Library::CoreLibrary());
4171 ASSERT(!core_lib.IsNull()); 4169 ASSERT(!core_lib.IsNull());
4172 result.AddImport(core_lib); 4170 result.AddImport(core_lib);
4173 if (FLAG_expose_core_impl) {
4174 // Make implementation corelib visible to Dart code.
4175 result.AddImport(Library::Handle(Library::CoreImplLibrary()));
4176 }
4177 } 4171 }
4178 return result.raw(); 4172 return result.raw();
4179 } 4173 }
4180 4174
4181 4175
4182 RawLibrary* Library::New(const String& url) { 4176 RawLibrary* Library::New(const String& url) {
4183 return NewLibraryHelper(url, true); 4177 return NewLibraryHelper(url, true);
4184 } 4178 }
4185 4179
4186 4180
(...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after
7272 const String& str = String::Handle(pattern()); 7266 const String& str = String::Handle(pattern());
7273 const char* format = "JSRegExp: pattern=%s flags=%s"; 7267 const char* format = "JSRegExp: pattern=%s flags=%s";
7274 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); 7268 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags());
7275 char* chars = reinterpret_cast<char*>( 7269 char* chars = reinterpret_cast<char*>(
7276 Isolate::Current()->current_zone()->Allocate(len + 1)); 7270 Isolate::Current()->current_zone()->Allocate(len + 1));
7277 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); 7271 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags());
7278 return chars; 7272 return chars;
7279 } 7273 }
7280 7274
7281 } // namespace dart 7275 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/literal_map_factory.dart ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698