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

Side by Side Diff: src/interpreter/interpreter-assembler.cc

Issue 2188993003: [stubs] Port CreateWeakCellStub to turbofan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix stack overflow Created 4 years, 4 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/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/interpreter-assembler.h" 5 #include "src/interpreter/interpreter-assembler.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 Node* is_same_native_context = 541 Node* is_same_native_context =
542 WordEqual(native_context, LoadNativeContext(context)); 542 WordEqual(native_context, LoadNativeContext(context));
543 GotoUnless(is_same_native_context, &mark_megamorphic); 543 GotoUnless(is_same_native_context, &mark_megamorphic);
544 544
545 // Initialize it to a monomorphic target. 545 // Initialize it to a monomorphic target.
546 Node* call_count_slot = IntPtrAdd(slot_id, IntPtrConstant(1)); 546 Node* call_count_slot = IntPtrAdd(slot_id, IntPtrConstant(1));
547 // Count is Smi, so we don't need a write barrier. 547 // Count is Smi, so we don't need a write barrier.
548 StoreFixedArrayElement(type_feedback_vector, call_count_slot, 548 StoreFixedArrayElement(type_feedback_vector, call_count_slot,
549 SmiTag(Int32Constant(1)), SKIP_WRITE_BARRIER); 549 SmiTag(Int32Constant(1)), SKIP_WRITE_BARRIER);
550 550
551 CreateWeakCellStub weak_cell_stub(isolate()); 551 CreateWeakCellInFeedbackVector(type_feedback_vector, SmiTag(slot_id),
Benedikt Meurer 2016/07/28 10:30:45 Awesome!
552 CallStub(weak_cell_stub.GetCallInterfaceDescriptor(), 552 function);
553 HeapConstant(weak_cell_stub.GetCode()), context,
554 type_feedback_vector, SmiTag(slot_id), function);
555 553
556 // Call using call function builtin. 554 // Call using call function builtin.
557 Callable callable = CodeFactory::InterpreterPushArgsAndCall( 555 Callable callable = CodeFactory::InterpreterPushArgsAndCall(
558 isolate(), tail_call_mode, CallableType::kJSFunction); 556 isolate(), tail_call_mode, CallableType::kJSFunction);
559 Node* code_target = HeapConstant(callable.code()); 557 Node* code_target = HeapConstant(callable.code());
560 Node* ret_value = CallStub(callable.descriptor(), code_target, context, 558 Node* ret_value = CallStub(callable.descriptor(), code_target, context,
561 arg_count, first_arg, function); 559 arg_count, first_arg, function);
562 return_value.Bind(ret_value); 560 return_value.Bind(ret_value);
563 Goto(&end); 561 Goto(&end);
564 } 562 }
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 Goto(&loop); 992 Goto(&loop);
995 } 993 }
996 Bind(&done_loop); 994 Bind(&done_loop);
997 995
998 return array; 996 return array;
999 } 997 }
1000 998
1001 } // namespace interpreter 999 } // namespace interpreter
1002 } // namespace internal 1000 } // namespace internal
1003 } // namespace v8 1001 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698