OLD | NEW |
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/builtins/builtins.h" | 5 #include "src/builtins/builtins.h" |
6 #include "src/code-events.h" | 6 #include "src/code-events.h" |
7 #include "src/compiler/code-assembler.h" | 7 #include "src/compiler/code-assembler.h" |
8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
9 #include "src/interface-descriptors.h" | 9 #include "src/interface-descriptors.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 Code::Flags flags, const char* name) { | 101 Code::Flags flags, const char* name) { |
102 HandleScope scope(isolate); | 102 HandleScope scope(isolate); |
103 Zone zone(isolate->allocator(), ZONE_NAME); | 103 Zone zone(isolate->allocator(), ZONE_NAME); |
104 // The interface descriptor with given key must be initialized at this point | 104 // The interface descriptor with given key must be initialized at this point |
105 // and this construction just queries the details from the descriptors table. | 105 // and this construction just queries the details from the descriptors table. |
106 CallInterfaceDescriptor descriptor(isolate, interface_descriptor); | 106 CallInterfaceDescriptor descriptor(isolate, interface_descriptor); |
107 // Ensure descriptor is already initialized. | 107 // Ensure descriptor is already initialized. |
108 DCHECK_LE(0, descriptor.GetRegisterParameterCount()); | 108 DCHECK_LE(0, descriptor.GetRegisterParameterCount()); |
109 compiler::CodeAssemblerState state(isolate, &zone, descriptor, flags, name); | 109 compiler::CodeAssemblerState state(isolate, &zone, descriptor, flags, name); |
110 generator(&state); | 110 generator(&state); |
111 | |
112 // TODO(ishell): remove this when code stub assembler graphs verification | |
113 // is enabled for all stubs. | |
114 bool saved_csa_verify = FLAG_csa_verify; | |
115 // Enable verification only in mksnapshot. | |
116 FLAG_csa_verify = DEBUG_BOOL && FLAG_startup_blob != nullptr; | |
117 Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state); | 111 Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state); |
118 FLAG_csa_verify = saved_csa_verify; | |
119 PostBuildProfileAndTracing(isolate, *code, name); | 112 PostBuildProfileAndTracing(isolate, *code, name); |
120 return *code; | 113 return *code; |
121 } | 114 } |
122 } // anonymous namespace | 115 } // anonymous namespace |
123 | 116 |
124 void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { | 117 void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { |
125 DCHECK(!initialized_); | 118 DCHECK(!initialized_); |
126 | 119 |
127 // Create a scope for the handles in the builtins. | 120 // Create a scope for the handles in the builtins. |
128 HandleScope scope(isolate); | 121 HandleScope scope(isolate); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // TODO(jochen): Remove this. | 289 // TODO(jochen): Remove this. |
297 if (responsible_context.is_null()) { | 290 if (responsible_context.is_null()) { |
298 return true; | 291 return true; |
299 } | 292 } |
300 if (*responsible_context == target->context()) return true; | 293 if (*responsible_context == target->context()) return true; |
301 return isolate->MayAccess(responsible_context, target_global_proxy); | 294 return isolate->MayAccess(responsible_context, target_global_proxy); |
302 } | 295 } |
303 | 296 |
304 } // namespace internal | 297 } // namespace internal |
305 } // namespace v8 | 298 } // namespace v8 |
OLD | NEW |