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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.h" |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 Handle<HandlerTable> table = | 120 Handle<HandlerTable> table = |
121 Handle<HandlerTable>::cast(isolate()->factory()->NewFixedArray( | 121 Handle<HandlerTable>::cast(isolate()->factory()->NewFixedArray( |
122 HandlerTable::LengthForRange(handler_table_size), TENURED)); | 122 HandlerTable::LengthForRange(handler_table_size), TENURED)); |
123 for (int i = 0; i < handler_table_size; ++i) { | 123 for (int i = 0; i < handler_table_size; ++i) { |
124 HandlerTable::CatchPrediction prediction = | 124 HandlerTable::CatchPrediction prediction = |
125 handler_table_[i].try_catch_depth > 0 ? HandlerTable::CAUGHT | 125 handler_table_[i].try_catch_depth > 0 ? HandlerTable::CAUGHT |
126 : HandlerTable::UNCAUGHT; | 126 : HandlerTable::UNCAUGHT; |
127 table->SetRangeStart(i, handler_table_[i].range_start); | 127 table->SetRangeStart(i, handler_table_[i].range_start); |
128 table->SetRangeEnd(i, handler_table_[i].range_end); | 128 table->SetRangeEnd(i, handler_table_[i].range_end); |
129 table->SetRangeHandler(i, handler_table_[i].handler_offset, prediction); | 129 table->SetRangeHandler(i, handler_table_[i].handler_offset, prediction); |
130 table->SetRangeDepth(i, handler_table_[i].stack_depth); | 130 table->SetRangeData(i, handler_table_[i].stack_depth); |
131 } | 131 } |
132 code->set_handler_table(*table); | 132 code->set_handler_table(*table); |
133 } | 133 } |
134 | 134 |
135 | 135 |
136 int FullCodeGenerator::NewHandlerTableEntry() { | 136 int FullCodeGenerator::NewHandlerTableEntry() { |
137 int index = static_cast<int>(handler_table_.size()); | 137 int index = static_cast<int>(handler_table_.size()); |
138 HandlerTableEntry entry = {0, 0, 0, 0, 0}; | 138 HandlerTableEntry entry = {0, 0, 0, 0, 0}; |
139 handler_table_.push_back(entry); | 139 handler_table_.push_back(entry); |
140 return index; | 140 return index; |
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1709 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1709 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1710 var->initializer_position() >= proxy->position(); | 1710 var->initializer_position() >= proxy->position(); |
1711 } | 1711 } |
1712 | 1712 |
1713 | 1713 |
1714 #undef __ | 1714 #undef __ |
1715 | 1715 |
1716 | 1716 |
1717 } // namespace internal | 1717 } // namespace internal |
1718 } // namespace v8 | 1718 } // namespace v8 |
OLD | NEW |