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

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

Issue 2752143004: [refactor] Separate generated builtins and C++ builtins into separate files (Closed)
Patch Set: tentative gcmole fix Created 3 years, 9 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-boolean.cc ('k') | src/builtins/builtins-constructor.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 // -----------------------------------------------------------------------------
13 // ES6 section 19.3 Boolean Objects
14
15 // ES6 section 19.3.3.2 Boolean.prototype.toString ( )
16 TF_BUILTIN(BooleanPrototypeToString, CodeStubAssembler) {
17 Node* receiver = Parameter(0);
18 Node* context = Parameter(3);
19
20 Node* value = ToThisValue(context, receiver, PrimitiveType::kBoolean,
21 "Boolean.prototype.toString");
22 Node* result = LoadObjectField(value, Oddball::kToStringOffset);
23 Return(result);
24 }
25
26 // ES6 section 19.3.3.3 Boolean.prototype.valueOf ( )
27 TF_BUILTIN(BooleanPrototypeValueOf, CodeStubAssembler) {
28 Node* receiver = Parameter(0);
29 Node* context = Parameter(3);
30
31 Node* result = ToThisValue(context, receiver, PrimitiveType::kBoolean,
32 "Boolean.prototype.valueOf");
33 Return(result);
34 }
35
36 } // namespace internal
37 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins/builtins-boolean.cc ('k') | src/builtins/builtins-constructor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698