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

Side by Side Diff: vm/stub_code.h

Issue 8827015: Implement two-argument check inline cache. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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
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 #ifndef VM_STUB_CODE_H_ 5 #ifndef VM_STUB_CODE_H_
6 #define VM_STUB_CODE_H_ 6 #define VM_STUB_CODE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 10
(...skipping 28 matching lines...) Expand all
39 // allocated in the VM isolate and shared across all isolates. 39 // allocated in the VM isolate and shared across all isolates.
40 // However, in cases where a simple GC-safe placeholder is needed on the stack, 40 // However, in cases where a simple GC-safe placeholder is needed on the stack,
41 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi 41 // using Smi 0 instead of Object::null() is slightly more efficient, since a Smi
42 // does not require relocation. 42 // does not require relocation.
43 43
44 // List of stubs created per isolate, these stubs could potentially contain 44 // List of stubs created per isolate, these stubs could potentially contain
45 // embedded objects and hence cannot be shared across isolates. 45 // embedded objects and hence cannot be shared across isolates.
46 #define STUB_CODE_LIST(V) \ 46 #define STUB_CODE_LIST(V) \
47 V(InvokeDartCode) \ 47 V(InvokeDartCode) \
48 V(AllocateContext) \ 48 V(AllocateContext) \
49 V(InlineCache) \ 49 V(OneArgCheckInlineCache) \
50 V(TwoArgsCheckInlineCache) \
50 V(BreakpointDynamic) \ 51 V(BreakpointDynamic) \
51 52
52 53
53 // class StubEntry is used to describe stub methods generated in dart to 54 // class StubEntry is used to describe stub methods generated in dart to
54 // abstract out common code executed from generated dart code. 55 // abstract out common code executed from generated dart code.
55 class StubEntry { 56 class StubEntry {
56 public: 57 public:
57 StubEntry(const char* name, const Code& code); 58 StubEntry(const char* name, const Code& code);
58 ~StubEntry() {} 59 ~StubEntry() {}
59 60
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 167
167 // Generate the stub and finalize the generated code into the stub 168 // Generate the stub and finalize the generated code into the stub
168 // code executable area. 169 // code executable area.
169 static RawCode* Generate(const char* name, 170 static RawCode* Generate(const char* name,
170 void (*GenerateStub)(Assembler* assembler)); 171 void (*GenerateStub)(Assembler* assembler));
171 172
172 static void GenerateAllocationStubForClass(Assembler* assembler, 173 static void GenerateAllocationStubForClass(Assembler* assembler,
173 const Class& cls); 174 const Class& cls);
174 static void GenerateAllocationStubForClosure(Assembler* assembler, 175 static void GenerateAllocationStubForClosure(Assembler* assembler,
175 const Function& func); 176 const Function& func);
177 static void GenerateNArgsCheckInlineCacheStub(Assembler* assembler,
178 intptr_t num_args);
176 }; 179 };
177 180
178 } // namespace dart 181 } // namespace dart
179 182
180 #endif // VM_STUB_CODE_H_ 183 #endif // VM_STUB_CODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698