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

Side by Side Diff: src/builtins.cc

Issue 2008293002: Revert of [json] support replacer function in BasicJsonStringifier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@jsonproplist
Patch Set: Created 4 years, 7 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.h ('k') | src/js/array.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/builtins.h" 5 #include "src/builtins.h"
6 6
7 #include "src/api-arguments.h" 7 #include "src/api-arguments.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
11 #include "src/bootstrapper.h" 11 #include "src/bootstrapper.h"
12 #include "src/code-factory.h" 12 #include "src/code-factory.h"
13 #include "src/code-stub-assembler.h" 13 #include "src/code-stub-assembler.h"
14 #include "src/dateparser-inl.h" 14 #include "src/dateparser-inl.h"
15 #include "src/elements.h" 15 #include "src/elements.h"
16 #include "src/frames-inl.h" 16 #include "src/frames-inl.h"
17 #include "src/gdb-jit.h" 17 #include "src/gdb-jit.h"
18 #include "src/ic/handler-compiler.h" 18 #include "src/ic/handler-compiler.h"
19 #include "src/ic/ic.h" 19 #include "src/ic/ic.h"
20 #include "src/isolate-inl.h" 20 #include "src/isolate-inl.h"
21 #include "src/json-stringifier.h"
22 #include "src/messages.h" 21 #include "src/messages.h"
23 #include "src/profiler/cpu-profiler.h" 22 #include "src/profiler/cpu-profiler.h"
24 #include "src/property-descriptor.h" 23 #include "src/property-descriptor.h"
25 #include "src/prototype.h" 24 #include "src/prototype.h"
26 #include "src/string-builder.h" 25 #include "src/string-builder.h"
27 #include "src/uri.h" 26 #include "src/uri.h"
28 #include "src/vm-state-inl.h" 27 #include "src/vm-state-inl.h"
29 28
30 namespace v8 { 29 namespace v8 {
31 namespace internal { 30 namespace internal {
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 Handle<JSFunction> function; 2172 Handle<JSFunction> function;
2174 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 2173 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
2175 isolate, function, 2174 isolate, function,
2176 CompileString(handle(target->native_context(), isolate), 2175 CompileString(handle(target->native_context(), isolate),
2177 Handle<String>::cast(x), NO_PARSE_RESTRICTION)); 2176 Handle<String>::cast(x), NO_PARSE_RESTRICTION));
2178 RETURN_RESULT_OR_FAILURE( 2177 RETURN_RESULT_OR_FAILURE(
2179 isolate, 2178 isolate,
2180 Execution::Call(isolate, function, target_global_proxy, 0, nullptr)); 2179 Execution::Call(isolate, function, target_global_proxy, 0, nullptr));
2181 } 2180 }
2182 2181
2183 // ES6 section 24.3.2 JSON.stringify.
2184 BUILTIN(JsonStringify) {
2185 HandleScope scope(isolate);
2186 JsonStringifier stringifier(isolate);
2187 Handle<Object> object = args.atOrUndefined(isolate, 1);
2188 Handle<Object> replacer = args.atOrUndefined(isolate, 2);
2189 Handle<Object> indent = args.atOrUndefined(isolate, 3);
2190 RETURN_RESULT_OR_FAILURE(isolate,
2191 stringifier.Stringify(object, replacer, indent));
2192 }
2193 2182
2194 // ----------------------------------------------------------------------------- 2183 // -----------------------------------------------------------------------------
2195 // ES6 section 20.2.2 Function Properties of the Math Object 2184 // ES6 section 20.2.2 Function Properties of the Math Object
2196 2185
2197 2186
2198 // ES6 section 20.2.2.2 Math.acos ( x ) 2187 // ES6 section 20.2.2.2 Math.acos ( x )
2199 BUILTIN(MathAcos) { 2188 BUILTIN(MathAcos) {
2200 HandleScope scope(isolate); 2189 HandleScope scope(isolate);
2201 DCHECK_EQ(2, args.length()); 2190 DCHECK_EQ(2, args.length());
2202 Handle<Object> x = args.at<Object>(1); 2191 Handle<Object> x = args.at<Object>(1);
(...skipping 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after
5543 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) 5532 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T)
5544 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 5533 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
5545 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 5534 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
5546 #undef DEFINE_BUILTIN_ACCESSOR_C 5535 #undef DEFINE_BUILTIN_ACCESSOR_C
5547 #undef DEFINE_BUILTIN_ACCESSOR_A 5536 #undef DEFINE_BUILTIN_ACCESSOR_A
5548 #undef DEFINE_BUILTIN_ACCESSOR_T 5537 #undef DEFINE_BUILTIN_ACCESSOR_T
5549 #undef DEFINE_BUILTIN_ACCESSOR_H 5538 #undef DEFINE_BUILTIN_ACCESSOR_H
5550 5539
5551 } // namespace internal 5540 } // namespace internal
5552 } // namespace v8 5541 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/js/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698