Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "src/builtins/builtins-utils-gen.h" | |
| 6 #include "src/builtins/builtins.h" | |
| 7 #include "src/code-stub-assembler.h" | |
| 8 | |
| 9 namespace v8 { | |
| 10 namespace internal { | |
| 11 | |
| 12 TF_BUILTIN(FastConsoleAssert, CodeStubAssembler) { | |
| 13 Label runtime(this); | |
| 14 Label out(this); | |
| 15 | |
| 16 // TODO(ishell): use constants from Descriptor once the JSFunction linkage | |
| 17 // arguments are reordered. | |
| 18 Node* argc = Parameter(BuiltinDescriptor::kArgumentsCount); | |
| 19 Node* context = Parameter(BuiltinDescriptor::kContext); | |
| 20 Node* new_target = Parameter(BuiltinDescriptor::kNewTarget); | |
| 21 | |
| 22 CodeStubArguments args(this, ChangeInt32ToIntPtr(argc)); | |
| 23 GotoIf(WordEqual(argc, IntPtrConstant(0)), &runtime); | |
|
Igor Sheludko
2017/04/20 10:18:42
argc is an int32, so the graph verifier will compl
kozy
2017/04/20 15:14:54
Done.
| |
| 24 BranchIfToBooleanIsTrue(args.AtIndex(0), &out, &runtime); | |
| 25 BIND(&out); | |
| 26 { args.PopAndReturn(UndefinedConstant()); } | |
|
Igor Sheludko
2017/04/20 10:18:42
Please remove {} and add an empty line after this
kozy
2017/04/20 15:14:54
Done.
| |
| 27 BIND(&runtime); | |
| 28 { | |
| 29 Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset, | |
| 30 MachineType::TaggedPointer()); | |
| 31 TailCallStub(CodeFactory::ConsoleAssert(isolate()), context, target, | |
|
Igor Sheludko
2017/04/20 10:18:42
It's simplier to use TailCallBuiltin().
kozy
2017/04/20 15:14:54
I couldn't find TailCallBuiltin in code-assembler,
Igor Sheludko
2017/04/20 15:20:10
I'm sorry. Please add CSA::TailCallBuiltin(), see
| |
| 32 new_target, argc); | |
| 33 } | |
| 34 } | |
| 35 | |
| 36 } // namespace internal | |
| 37 } // namespace v8 | |
| OLD | NEW |