diff options
author | Michaël Zasso <targos@protonmail.com> | 2016-09-06 22:49:51 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2016-09-22 09:51:19 +0200 |
commit | ec02b811a8a5c999bab4de312be2d732b7d9d50b (patch) | |
tree | ca3068017254f238cf413a451c57a803572983a4 /deps/v8/src/interpreter/handler-table-builder.cc | |
parent | d2eb7ce0105369a9cad82787cb33a665e9bd00ad (diff) | |
download | node-new-ec02b811a8a5c999bab4de312be2d732b7d9d50b.tar.gz |
deps: update V8 to 5.4.500.27
Pick up latest commit from the 5.4-lkgr branch.
deps: edit V8 gitignore to allow trace event copy
deps: update V8 trace event to 315bf1e2d45be7d53346c31cfcc37424a32c30c8
deps: edit V8 gitignore to allow gtest_prod.h copy
deps: update V8 gtest to 6f8a66431cb592dad629028a50b3dd418a408c87
PR-URL: https://github.com/nodejs/node/pull/8317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/interpreter/handler-table-builder.cc')
-rw-r--r-- | deps/v8/src/interpreter/handler-table-builder.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/deps/v8/src/interpreter/handler-table-builder.cc b/deps/v8/src/interpreter/handler-table-builder.cc index 374089bdc3..2ff7f2130a 100644 --- a/deps/v8/src/interpreter/handler-table-builder.cc +++ b/deps/v8/src/interpreter/handler-table-builder.cc @@ -5,6 +5,7 @@ #include "src/interpreter/handler-table-builder.h" #include "src/factory.h" +#include "src/interpreter/bytecode-register.h" #include "src/isolate.h" #include "src/objects-inl.h" @@ -12,18 +13,16 @@ namespace v8 { namespace internal { namespace interpreter { -HandlerTableBuilder::HandlerTableBuilder(Isolate* isolate, Zone* zone) - : isolate_(isolate), entries_(zone) {} +HandlerTableBuilder::HandlerTableBuilder(Zone* zone) : entries_(zone) {} -Handle<HandlerTable> HandlerTableBuilder::ToHandlerTable() { +Handle<HandlerTable> HandlerTableBuilder::ToHandlerTable(Isolate* isolate) { int handler_table_size = static_cast<int>(entries_.size()); Handle<HandlerTable> table = - Handle<HandlerTable>::cast(isolate_->factory()->NewFixedArray( + Handle<HandlerTable>::cast(isolate->factory()->NewFixedArray( HandlerTable::LengthForRange(handler_table_size), TENURED)); for (int i = 0; i < handler_table_size; ++i) { Entry& entry = entries_[i]; - HandlerTable::CatchPrediction pred = - entry.will_catch ? HandlerTable::CAUGHT : HandlerTable::UNCAUGHT; + HandlerTable::CatchPrediction pred = entry.catch_prediction_; table->SetRangeStart(i, static_cast<int>(entry.offset_start)); table->SetRangeEnd(i, static_cast<int>(entry.offset_end)); table->SetRangeHandler(i, static_cast<int>(entry.offset_target), pred); @@ -35,7 +34,7 @@ Handle<HandlerTable> HandlerTableBuilder::ToHandlerTable() { int HandlerTableBuilder::NewHandlerEntry() { int handler_id = static_cast<int>(entries_.size()); - Entry entry = {0, 0, 0, Register(), false}; + Entry entry = {0, 0, 0, Register(), HandlerTable::UNCAUGHT}; entries_.push_back(entry); return handler_id; } @@ -58,9 +57,9 @@ void HandlerTableBuilder::SetHandlerTarget(int handler_id, size_t offset) { entries_[handler_id].offset_target = offset; } - -void HandlerTableBuilder::SetPrediction(int handler_id, bool will_catch) { - entries_[handler_id].will_catch = will_catch; +void HandlerTableBuilder::SetPrediction( + int handler_id, HandlerTable::CatchPrediction prediction) { + entries_[handler_id].catch_prediction_ = prediction; } |