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

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

Issue 10540045: - Get handle vtable from a static table for predefined classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months 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
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 24 matching lines...) Expand all
35 "Generate symbols of generated dart functions for debugging with GDB"); 35 "Generate symbols of generated dart functions for debugging with GDB");
36 DECLARE_FLAG(bool, trace_compiler); 36 DECLARE_FLAG(bool, trace_compiler);
37 DECLARE_FLAG(bool, enable_type_checks); 37 DECLARE_FLAG(bool, enable_type_checks);
38 38
39 static const char* kGetterPrefix = "get:"; 39 static const char* kGetterPrefix = "get:";
40 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix); 40 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
41 static const char* kSetterPrefix = "set:"; 41 static const char* kSetterPrefix = "set:";
42 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix); 42 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix);
43 43
44 cpp_vtable Object::handle_vtable_ = 0; 44 cpp_vtable Object::handle_vtable_ = 0;
45 cpp_vtable Object::builtin_vtables_[kNumPredefinedKinds] = { 0 };
45 cpp_vtable Smi::handle_vtable_ = 0; 46 cpp_vtable Smi::handle_vtable_ = 0;
46 47
47 // These are initialized to a value that will force a illegal memory access if 48 // These are initialized to a value that will force a illegal memory access if
48 // they are being used. 49 // they are being used.
49 #if defined(RAW_NULL) 50 #if defined(RAW_NULL)
50 #error RAW_NULL should not be defined. 51 #error RAW_NULL should not be defined.
51 #endif 52 #endif
52 #define RAW_NULL kHeapObjectTag 53 #define RAW_NULL kHeapObjectTag
53 RawObject* Object::null_ = reinterpret_cast<RawInstance*>(RAW_NULL); 54 RawObject* Object::null_ = reinterpret_cast<RawInstance*>(RAW_NULL);
54 RawInstance* Object::sentinel_ = reinterpret_cast<RawInstance*>(RAW_NULL); 55 RawInstance* Object::sentinel_ = reinterpret_cast<RawInstance*>(RAW_NULL);
(...skipping 10045 matching lines...) Expand 10 before | Expand all | Expand 10 after
10100 const String& str = String::Handle(pattern()); 10101 const String& str = String::Handle(pattern());
10101 const char* format = "JSRegExp: pattern=%s flags=%s"; 10102 const char* format = "JSRegExp: pattern=%s flags=%s";
10102 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); 10103 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags());
10103 char* chars = reinterpret_cast<char*>( 10104 char* chars = reinterpret_cast<char*>(
10104 Isolate::Current()->current_zone()->Allocate(len + 1)); 10105 Isolate::Current()->current_zone()->Allocate(len + 1));
10105 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); 10106 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags());
10106 return chars; 10107 return chars;
10107 } 10108 }
10108 10109
10109 } // namespace dart 10110 } // namespace dart
OLDNEW
« runtime/vm/object.h ('K') | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698