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

Side by Side Diff: src/builtins/builtins-console-gen.cc

Issue 2828933002: [console] fast console.assert(true) (Closed)
Patch Set: addressed comments Created 3 years, 8 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/builtins/builtins.cc ('k') | src/builtins/builtins-definitions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 GotoIf(Word32Equal(argc, Int32Constant(0)), &runtime);
22
23 CodeStubArguments args(this, ChangeInt32ToIntPtr(argc));
24 BranchIfToBooleanIsTrue(args.AtIndex(0), &out, &runtime);
25 BIND(&out);
26 args.PopAndReturn(UndefinedConstant());
27
28 BIND(&runtime);
29 {
30 Node* target = LoadFromFrame(StandardFrameConstants::kFunctionOffset,
31 MachineType::TaggedPointer());
32 TailCallBuiltin(Builtins::kConsoleAssert, context, target, new_target,
33 argc);
34 }
35 }
36
37 } // namespace internal
38 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins.cc ('k') | src/builtins/builtins-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698