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

Side by Side Diff: src/compiler.h

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « src/code-stubs.h ('k') | src/compiler/access-builder.h » ('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 #ifndef V8_COMPILER_H_ 5 #ifndef V8_COMPILER_H_
6 #define V8_COMPILER_H_ 6 #define V8_COMPILER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 bool ShouldTrapOnDeopt() const { 286 bool ShouldTrapOnDeopt() const {
287 return (FLAG_trap_on_deopt && IsOptimizing()) || 287 return (FLAG_trap_on_deopt && IsOptimizing()) ||
288 (FLAG_trap_on_stub_deopt && IsStub()); 288 (FLAG_trap_on_stub_deopt && IsStub());
289 } 289 }
290 290
291 bool has_global_object() const { 291 bool has_global_object() const {
292 return !closure().is_null() && 292 return !closure().is_null() &&
293 (closure()->context()->global_object() != NULL); 293 (closure()->context()->global_object() != NULL);
294 } 294 }
295 295
296 GlobalObject* global_object() const { 296 JSGlobalObject* global_object() const {
297 return has_global_object() ? closure()->context()->global_object() : NULL; 297 return has_global_object() ? closure()->context()->global_object() : NULL;
298 } 298 }
299 299
300 // Accessors for the different compilation modes. 300 // Accessors for the different compilation modes.
301 bool IsOptimizing() const { return mode_ == OPTIMIZE; } 301 bool IsOptimizing() const { return mode_ == OPTIMIZE; }
302 bool IsStub() const { return mode_ == STUB; } 302 bool IsStub() const { return mode_ == STUB; }
303 void SetOptimizing(BailoutId osr_ast_id, Handle<Code> unoptimized) { 303 void SetOptimizing(BailoutId osr_ast_id, Handle<Code> unoptimized) {
304 DCHECK(has_shared_info()); 304 DCHECK(has_shared_info());
305 SetMode(OPTIMIZE); 305 SetMode(OPTIMIZE);
306 osr_ast_id_ = osr_ast_id; 306 osr_ast_id_ = osr_ast_id;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 size_t info_zone_start_allocation_size_; 722 size_t info_zone_start_allocation_size_;
723 base::ElapsedTimer timer_; 723 base::ElapsedTimer timer_;
724 724
725 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 725 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
726 }; 726 };
727 727
728 } // namespace internal 728 } // namespace internal
729 } // namespace v8 729 } // namespace v8
730 730
731 #endif // V8_COMPILER_H_ 731 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/access-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698