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

Side by Side Diff: src/compiler.h

Issue 110573004: Merge bleeding_edge 17696:18016. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 Code::Flags flags() const; 91 Code::Flags flags() const;
92 92
93 void MarkAsEval() { 93 void MarkAsEval() {
94 ASSERT(!is_lazy()); 94 ASSERT(!is_lazy());
95 flags_ |= IsEval::encode(true); 95 flags_ |= IsEval::encode(true);
96 } 96 }
97 void MarkAsGlobal() { 97 void MarkAsGlobal() {
98 ASSERT(!is_lazy()); 98 ASSERT(!is_lazy());
99 flags_ |= IsGlobal::encode(true); 99 flags_ |= IsGlobal::encode(true);
100 } 100 }
101 void set_parameter_count(int parameter_count) {
102 ASSERT(IsStub());
103 parameter_count_ = parameter_count;
104 }
101 void SetLanguageMode(LanguageMode language_mode) { 105 void SetLanguageMode(LanguageMode language_mode) {
102 ASSERT(this->language_mode() == CLASSIC_MODE || 106 ASSERT(this->language_mode() == CLASSIC_MODE ||
103 this->language_mode() == language_mode || 107 this->language_mode() == language_mode ||
104 language_mode == EXTENDED_MODE); 108 language_mode == EXTENDED_MODE);
105 flags_ = LanguageModeField::update(flags_, language_mode); 109 flags_ = LanguageModeField::update(flags_, language_mode);
106 } 110 }
107 void MarkAsInLoop() { 111 void MarkAsInLoop() {
108 ASSERT(is_lazy()); 112 ASSERT(is_lazy());
109 flags_ |= IsInLoop::encode(true); 113 flags_ |= IsInLoop::encode(true);
110 } 114 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 295
292 Handle<Foreign> object_wrapper() { 296 Handle<Foreign> object_wrapper() {
293 if (object_wrapper_.is_null()) { 297 if (object_wrapper_.is_null()) {
294 object_wrapper_ = 298 object_wrapper_ =
295 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this)); 299 isolate()->factory()->NewForeign(reinterpret_cast<Address>(this));
296 } 300 }
297 return object_wrapper_; 301 return object_wrapper_;
298 } 302 }
299 303
300 void AbortDueToDependencyChange() { 304 void AbortDueToDependencyChange() {
301 ASSERT(!isolate()->optimizing_compiler_thread()->IsOptimizerThread()); 305 ASSERT(!OptimizingCompilerThread::IsOptimizerThread(isolate()));
302 abort_due_to_dependency_ = true; 306 abort_due_to_dependency_ = true;
303 } 307 }
304 308
305 bool HasAbortedDueToDependencyChange() { 309 bool HasAbortedDueToDependencyChange() {
306 ASSERT(!isolate()->optimizing_compiler_thread()->IsOptimizerThread()); 310 ASSERT(!OptimizingCompilerThread::IsOptimizerThread(isolate()));
307 return abort_due_to_dependency_; 311 return abort_due_to_dependency_;
308 } 312 }
309 313
310 void set_osr_pc_offset(uint32_t pc_offset) { 314 void set_osr_pc_offset(uint32_t pc_offset) {
311 osr_pc_offset_ = pc_offset; 315 osr_pc_offset_ = pc_offset;
312 } 316 }
313 317
314 bool HasSameOsrEntry(Handle<JSFunction> function, uint32_t pc_offset) { 318 bool HasSameOsrEntry(Handle<JSFunction> function, uint32_t pc_offset) {
315 return osr_pc_offset_ == pc_offset && function.is_identical_to(closure_); 319 return osr_pc_offset_ == pc_offset && function.is_identical_to(closure_);
316 } 320 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 BailoutReason bailout_reason_; 439 BailoutReason bailout_reason_;
436 440
437 int prologue_offset_; 441 int prologue_offset_;
438 442
439 List<OffsetRange>* no_frame_ranges_; 443 List<OffsetRange>* no_frame_ranges_;
440 444
441 // A copy of shared_info()->opt_count() to avoid handle deref 445 // A copy of shared_info()->opt_count() to avoid handle deref
442 // during graph optimization. 446 // during graph optimization.
443 int opt_count_; 447 int opt_count_;
444 448
449 // Number of parameters used for compilation of stubs that require arguments.
450 int parameter_count_;
451
445 Handle<Foreign> object_wrapper_; 452 Handle<Foreign> object_wrapper_;
446 453
447 DISALLOW_COPY_AND_ASSIGN(CompilationInfo); 454 DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
448 }; 455 };
449 456
450 457
451 // Exactly like a CompilationInfo, except also creates and enters a 458 // Exactly like a CompilationInfo, except also creates and enters a
452 // Zone on construction and deallocates it on exit. 459 // Zone on construction and deallocates it on exit.
453 class CompilationInfoWithZone: public CompilationInfo { 460 class CompilationInfoWithZone: public CompilationInfo {
454 public: 461 public:
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 unsigned info_zone_start_allocation_size_; 671 unsigned info_zone_start_allocation_size_;
665 ElapsedTimer timer_; 672 ElapsedTimer timer_;
666 673
667 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); 674 DISALLOW_COPY_AND_ASSIGN(CompilationPhase);
668 }; 675 };
669 676
670 677
671 } } // namespace v8::internal 678 } } // namespace v8::internal
672 679
673 #endif // V8_COMPILER_H_ 680 #endif // V8_COMPILER_H_
OLDNEW
« include/v8-platform.h ('K') | « src/codegen.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698