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

Side by Side Diff: src/builtins/builtins.cc

Issue 2568713002: [stubs] Fixing issues found by machine graph verifier in code stubs. (Closed)
Patch Set: Addressing nits Created 4 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
« no previous file with comments | « no previous file | src/builtins/builtins-internal.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/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
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;
111 Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state); 117 Handle<Code> code = compiler::CodeAssembler::GenerateCode(&state);
118 FLAG_csa_verify = saved_csa_verify;
112 PostBuildProfileAndTracing(isolate, *code, name); 119 PostBuildProfileAndTracing(isolate, *code, name);
113 return *code; 120 return *code;
114 } 121 }
115 } // anonymous namespace 122 } // anonymous namespace
116 123
117 void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) { 124 void Builtins::SetUp(Isolate* isolate, bool create_heap_objects) {
118 DCHECK(!initialized_); 125 DCHECK(!initialized_);
119 126
120 // Create a scope for the handles in the builtins. 127 // Create a scope for the handles in the builtins.
121 HandleScope scope(isolate); 128 HandleScope scope(isolate);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 // TODO(jochen): Remove this. 296 // TODO(jochen): Remove this.
290 if (responsible_context.is_null()) { 297 if (responsible_context.is_null()) {
291 return true; 298 return true;
292 } 299 }
293 if (*responsible_context == target->context()) return true; 300 if (*responsible_context == target->context()) return true;
294 return isolate->MayAccess(responsible_context, target_global_proxy); 301 return isolate->MayAccess(responsible_context, target_global_proxy);
295 } 302 }
296 303
297 } // namespace internal 304 } // namespace internal
298 } // namespace v8 305 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698