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

Side by Side Diff: src/interface-descriptors.cc

Issue 535103002: CallDescriptors::InitializeForIsolate() is no longer needed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/interface-descriptors.h ('k') | src/isolate.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interface-descriptors.h" 7 #include "src/interface-descriptors.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 24 matching lines...) Expand all
35 // If there is a context register, the representation must be tagged. 35 // If there is a context register, the representation must be tagged.
36 DCHECK( 36 DCHECK(
37 i != 0 || 37 i != 0 ||
38 register_param_representations[i].Equals(Representation::Tagged())); 38 register_param_representations[i].Equals(Representation::Tagged()));
39 register_param_representations_[i] = register_param_representations[i]; 39 register_param_representations_[i] = register_param_representations[i];
40 } 40 }
41 } 41 }
42 } 42 }
43 43
44 44
45 void LoadDescriptor::Initialize(Isolate* isolate) { 45 void LoadDescriptor::Initialize(CallInterfaceDescriptorData* data) {
46 Register registers[] = {ContextRegister(), ReceiverRegister(), 46 Register registers[] = {ContextRegister(), ReceiverRegister(),
47 NameRegister()}; 47 NameRegister()};
48 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 48 data->Initialize(arraysize(registers), registers, NULL);
49 } 49 }
50 50
51 51
52 void StoreDescriptor::Initialize(Isolate* isolate) { 52 void StoreDescriptor::Initialize(CallInterfaceDescriptorData* data) {
53 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), 53 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
54 ValueRegister()}; 54 ValueRegister()};
55 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 55 data->Initialize(arraysize(registers), registers, NULL);
56 } 56 }
57 57
58 58
59 void ElementTransitionAndStoreDescriptor::Initialize(Isolate* isolate) { 59 void ElementTransitionAndStoreDescriptor::Initialize(
60 CallInterfaceDescriptorData* data) {
60 Register registers[] = {ContextRegister(), ValueRegister(), MapRegister(), 61 Register registers[] = {ContextRegister(), ValueRegister(), MapRegister(),
61 NameRegister(), ReceiverRegister()}; 62 NameRegister(), ReceiverRegister()};
62 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 63 data->Initialize(arraysize(registers), registers, NULL);
63 } 64 }
64 65
65 66
66 void InstanceofDescriptor::Initialize(Isolate* isolate) { 67 void InstanceofDescriptor::Initialize(CallInterfaceDescriptorData* data) {
67 Register registers[] = {ContextRegister(), left(), right()}; 68 Register registers[] = {ContextRegister(), left(), right()};
68 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 69 data->Initialize(arraysize(registers), registers, NULL);
69 } 70 }
70 71
71 72
72 void VectorLoadICDescriptor::Initialize(Isolate* isolate) { 73 void VectorLoadICDescriptor::Initialize(CallInterfaceDescriptorData* data) {
73 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(), 74 Register registers[] = {ContextRegister(), ReceiverRegister(), NameRegister(),
74 SlotRegister(), VectorRegister()}; 75 SlotRegister(), VectorRegister()};
75 InitializeData(isolate, key(), arraysize(registers), registers, NULL); 76 data->Initialize(arraysize(registers), registers, NULL);
76 } 77 }
77 78
78
79 void CallDescriptors::InitializeForIsolate(Isolate* isolate) {
80 // Mechanically initialize all descriptors. The DCHECK makes sure that the
81 // Initialize() method did what it is supposed to do.
82
83 #define INITIALIZE_DESCRIPTOR(D) \
84 D##Descriptor::Initialize(isolate); \
85 DCHECK(D##Descriptor(isolate).IsInitialized());
86
87 INTERFACE_DESCRIPTOR_LIST(INITIALIZE_DESCRIPTOR)
88 #undef INITIALIZE_DESCRIPTOR
89 }
90 } 79 }
91 } // namespace v8::internal 80 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/interface-descriptors.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698