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

Side by Side Diff: src/deoptimizer.cc

Issue 1688023003: Remove the JS_FRAME_FUNCTION deoptimizer translation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months 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/deoptimizer.h ('k') | src/frames.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/deoptimizer.h" 5 #include "src/deoptimizer.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/ast/prettyprinter.h" 8 #include "src/ast/prettyprinter.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/disasm.h" 10 #include "src/disasm.h"
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 int args_index, 2353 int args_index,
2354 int args_length) { 2354 int args_length) {
2355 buffer_->Add(ARGUMENTS_OBJECT, zone()); 2355 buffer_->Add(ARGUMENTS_OBJECT, zone());
2356 buffer_->Add(args_known, zone()); 2356 buffer_->Add(args_known, zone());
2357 buffer_->Add(args_index, zone()); 2357 buffer_->Add(args_index, zone());
2358 buffer_->Add(args_length, zone()); 2358 buffer_->Add(args_length, zone());
2359 } 2359 }
2360 2360
2361 2361
2362 void Translation::StoreJSFrameFunction() { 2362 void Translation::StoreJSFrameFunction() {
2363 buffer_->Add(JS_FRAME_FUNCTION, zone()); 2363 StoreStackSlot((StandardFrameConstants::kCallerPCOffset -
2364 StandardFrameConstants::kMarkerOffset) /
2365 kPointerSize);
2364 } 2366 }
2365 2367
2366
2367 int Translation::NumberOfOperandsFor(Opcode opcode) { 2368 int Translation::NumberOfOperandsFor(Opcode opcode) {
2368 switch (opcode) { 2369 switch (opcode) {
2369 case JS_FRAME_FUNCTION:
2370 return 0;
2371 case GETTER_STUB_FRAME: 2370 case GETTER_STUB_FRAME:
2372 case SETTER_STUB_FRAME: 2371 case SETTER_STUB_FRAME:
2373 case DUPLICATED_OBJECT: 2372 case DUPLICATED_OBJECT:
2374 case ARGUMENTS_OBJECT: 2373 case ARGUMENTS_OBJECT:
2375 case CAPTURED_OBJECT: 2374 case CAPTURED_OBJECT:
2376 case REGISTER: 2375 case REGISTER:
2377 case INT32_REGISTER: 2376 case INT32_REGISTER:
2378 case UINT32_REGISTER: 2377 case UINT32_REGISTER:
2379 case BOOL_REGISTER: 2378 case BOOL_REGISTER:
2380 case DOUBLE_REGISTER: 2379 case DOUBLE_REGISTER:
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
3053 case Translation::INT32_REGISTER: 3052 case Translation::INT32_REGISTER:
3054 case Translation::UINT32_REGISTER: 3053 case Translation::UINT32_REGISTER:
3055 case Translation::BOOL_REGISTER: 3054 case Translation::BOOL_REGISTER:
3056 case Translation::DOUBLE_REGISTER: 3055 case Translation::DOUBLE_REGISTER:
3057 case Translation::STACK_SLOT: 3056 case Translation::STACK_SLOT:
3058 case Translation::INT32_STACK_SLOT: 3057 case Translation::INT32_STACK_SLOT:
3059 case Translation::UINT32_STACK_SLOT: 3058 case Translation::UINT32_STACK_SLOT:
3060 case Translation::BOOL_STACK_SLOT: 3059 case Translation::BOOL_STACK_SLOT:
3061 case Translation::DOUBLE_STACK_SLOT: 3060 case Translation::DOUBLE_STACK_SLOT:
3062 case Translation::LITERAL: 3061 case Translation::LITERAL:
3063 case Translation::JS_FRAME_FUNCTION:
3064 break; 3062 break;
3065 } 3063 }
3066 FATAL("We should never get here - unexpected deopt info."); 3064 FATAL("We should never get here - unexpected deopt info.");
3067 return TranslatedFrame::InvalidFrame(); 3065 return TranslatedFrame::InvalidFrame();
3068 } 3066 }
3069 3067
3070 3068
3071 // static 3069 // static
3072 void TranslatedFrame::AdvanceIterator( 3070 void TranslatedFrame::AdvanceIterator(
3073 std::deque<TranslatedValue>::iterator* iter) { 3071 std::deque<TranslatedValue>::iterator* iter) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3256 int literal_index = iterator->Next(); 3254 int literal_index = iterator->Next();
3257 Object* value = literal_array->get(literal_index); 3255 Object* value = literal_array->get(literal_index);
3258 if (trace_file != nullptr) { 3256 if (trace_file != nullptr) {
3259 PrintF(trace_file, "0x%08" V8PRIxPTR " ; (literal %d) ", 3257 PrintF(trace_file, "0x%08" V8PRIxPTR " ; (literal %d) ",
3260 reinterpret_cast<intptr_t>(value), literal_index); 3258 reinterpret_cast<intptr_t>(value), literal_index);
3261 reinterpret_cast<Object*>(value)->ShortPrint(trace_file); 3259 reinterpret_cast<Object*>(value)->ShortPrint(trace_file);
3262 } 3260 }
3263 3261
3264 return TranslatedValue::NewTagged(this, value); 3262 return TranslatedValue::NewTagged(this, value);
3265 } 3263 }
3266
3267 case Translation::JS_FRAME_FUNCTION: {
3268 int slot_offset = JavaScriptFrameConstants::kFunctionOffset;
3269 intptr_t value = *(reinterpret_cast<intptr_t*>(fp + slot_offset));
3270 if (trace_file != nullptr) {
3271 PrintF(trace_file, "0x%08" V8PRIxPTR " ; (frame function) ", value);
3272 reinterpret_cast<Object*>(value)->ShortPrint(trace_file);
3273 }
3274 return TranslatedValue::NewTagged(this, reinterpret_cast<Object*>(value));
3275 }
3276 } 3264 }
3277 3265
3278 FATAL("We should never get here - unexpected deopt info."); 3266 FATAL("We should never get here - unexpected deopt info.");
3279 return TranslatedValue(nullptr, TranslatedValue::kInvalid); 3267 return TranslatedValue(nullptr, TranslatedValue::kInvalid);
3280 } 3268 }
3281 3269
3282 3270
3283 TranslatedState::TranslatedState(JavaScriptFrame* frame) 3271 TranslatedState::TranslatedState(JavaScriptFrame* frame)
3284 : isolate_(nullptr), 3272 : isolate_(nullptr),
3285 stack_frame_pointer_(nullptr), 3273 stack_frame_pointer_(nullptr),
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
3711 DCHECK(value_info->IsMaterializedObject()); 3699 DCHECK(value_info->IsMaterializedObject());
3712 3700
3713 value_info->value_ = 3701 value_info->value_ =
3714 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3702 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3715 } 3703 }
3716 } 3704 }
3717 } 3705 }
3718 3706
3719 } // namespace internal 3707 } // namespace internal
3720 } // namespace v8 3708 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimizer.h ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698