OLD | NEW |
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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 void RollbackDependencies(); | 252 void RollbackDependencies(); |
253 | 253 |
254 void SaveHandles() { | 254 void SaveHandles() { |
255 SaveHandle(&closure_); | 255 SaveHandle(&closure_); |
256 SaveHandle(&shared_info_); | 256 SaveHandle(&shared_info_); |
257 SaveHandle(&context_); | 257 SaveHandle(&context_); |
258 SaveHandle(&script_); | 258 SaveHandle(&script_); |
259 } | 259 } |
260 | 260 |
261 const char* bailout_reason() const { return bailout_reason_; } | 261 BailoutReason bailout_reason() const { return bailout_reason_; } |
262 void set_bailout_reason(const char* reason) { bailout_reason_ = reason; } | 262 void set_bailout_reason(BailoutReason reason) { bailout_reason_ = reason; } |
263 | 263 |
264 int prologue_offset() const { | 264 int prologue_offset() const { |
265 ASSERT_NE(kPrologueOffsetNotSet, prologue_offset_); | 265 ASSERT_NE(kPrologueOffsetNotSet, prologue_offset_); |
266 return prologue_offset_; | 266 return prologue_offset_; |
267 } | 267 } |
268 | 268 |
269 void set_prologue_offset(int prologue_offset) { | 269 void set_prologue_offset(int prologue_offset) { |
270 ASSERT_EQ(kPrologueOffsetNotSet, prologue_offset_); | 270 ASSERT_EQ(kPrologueOffsetNotSet, prologue_offset_); |
271 prologue_offset_ = prologue_offset; | 271 prologue_offset_ = prologue_offset; |
272 } | 272 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount]; | 405 ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount]; |
406 | 406 |
407 template<typename T> | 407 template<typename T> |
408 void SaveHandle(Handle<T> *object) { | 408 void SaveHandle(Handle<T> *object) { |
409 if (!object->is_null()) { | 409 if (!object->is_null()) { |
410 Handle<T> handle(*(*object)); | 410 Handle<T> handle(*(*object)); |
411 *object = handle; | 411 *object = handle; |
412 } | 412 } |
413 } | 413 } |
414 | 414 |
415 const char* bailout_reason_; | 415 BailoutReason bailout_reason_; |
416 | 416 |
417 int prologue_offset_; | 417 int prologue_offset_; |
418 | 418 |
419 List<OffsetRange>* no_frame_ranges_; | 419 List<OffsetRange>* no_frame_ranges_; |
420 | 420 |
421 // A copy of shared_info()->opt_count() to avoid handle deref | 421 // A copy of shared_info()->opt_count() to avoid handle deref |
422 // during graph optimization. | 422 // during graph optimization. |
423 int opt_count_; | 423 int opt_count_; |
424 | 424 |
425 Handle<Foreign> object_wrapper_; | 425 Handle<Foreign> object_wrapper_; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 | 565 |
566 // All routines return a SharedFunctionInfo. | 566 // All routines return a SharedFunctionInfo. |
567 // If an error occurs an exception is raised and the return handle | 567 // If an error occurs an exception is raised and the return handle |
568 // contains NULL. | 568 // contains NULL. |
569 | 569 |
570 // Compile a String source within a context. | 570 // Compile a String source within a context. |
571 static Handle<SharedFunctionInfo> Compile(Handle<String> source, | 571 static Handle<SharedFunctionInfo> Compile(Handle<String> source, |
572 Handle<Object> script_name, | 572 Handle<Object> script_name, |
573 int line_offset, | 573 int line_offset, |
574 int column_offset, | 574 int column_offset, |
| 575 bool is_shared_cross_origin, |
575 Handle<Context> context, | 576 Handle<Context> context, |
576 v8::Extension* extension, | 577 v8::Extension* extension, |
577 ScriptDataImpl* pre_data, | 578 ScriptDataImpl* pre_data, |
578 Handle<Object> script_data, | 579 Handle<Object> script_data, |
579 NativesFlag is_natives_code); | 580 NativesFlag is_natives_code); |
580 | 581 |
581 // Compile a String source within a context for Eval. | 582 // Compile a String source within a context for Eval. |
582 static Handle<SharedFunctionInfo> CompileEval(Handle<String> source, | 583 static Handle<SharedFunctionInfo> CompileEval(Handle<String> source, |
583 Handle<Context> context, | 584 Handle<Context> context, |
584 bool is_global, | 585 bool is_global, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 unsigned info_zone_start_allocation_size_; | 636 unsigned info_zone_start_allocation_size_; |
636 int64_t start_ticks_; | 637 int64_t start_ticks_; |
637 | 638 |
638 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); | 639 DISALLOW_COPY_AND_ASSIGN(CompilationPhase); |
639 }; | 640 }; |
640 | 641 |
641 | 642 |
642 } } // namespace v8::internal | 643 } } // namespace v8::internal |
643 | 644 |
644 #endif // V8_COMPILER_H_ | 645 #endif // V8_COMPILER_H_ |
OLD | NEW |