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

Side by Side Diff: src/json-stringifier.h

Issue 1552473002: Revert of [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@FunctionConstructor
Patch Set: Created 4 years, 11 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/js/v8natives.js ('k') | src/mips/builtins-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 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 #ifndef V8_JSON_STRINGIFIER_H_ 5 #ifndef V8_JSON_STRINGIFIER_H_
6 #define V8_JSON_STRINGIFIER_H_ 6 #define V8_JSON_STRINGIFIER_H_
7 7
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/messages.h" 10 #include "src/messages.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 default: 330 default:
331 return UNCHANGED; 331 return UNCHANGED;
332 } 332 }
333 case JS_ARRAY_TYPE: 333 case JS_ARRAY_TYPE:
334 if (object->IsAccessCheckNeeded()) break; 334 if (object->IsAccessCheckNeeded()) break;
335 if (deferred_string_key) SerializeDeferredKey(comma, key); 335 if (deferred_string_key) SerializeDeferredKey(comma, key);
336 return SerializeJSArray(Handle<JSArray>::cast(object)); 336 return SerializeJSArray(Handle<JSArray>::cast(object));
337 case JS_VALUE_TYPE: 337 case JS_VALUE_TYPE:
338 if (deferred_string_key) SerializeDeferredKey(comma, key); 338 if (deferred_string_key) SerializeDeferredKey(comma, key);
339 return SerializeJSValue(Handle<JSValue>::cast(object)); 339 return SerializeJSValue(Handle<JSValue>::cast(object));
340 case JS_FUNCTION_TYPE:
341 return UNCHANGED;
340 default: 342 default:
341 if (object->IsString()) { 343 if (object->IsString()) {
342 if (deferred_string_key) SerializeDeferredKey(comma, key); 344 if (deferred_string_key) SerializeDeferredKey(comma, key);
343 SerializeString(Handle<String>::cast(object)); 345 SerializeString(Handle<String>::cast(object));
344 return SUCCESS; 346 return SUCCESS;
345 } else if (object->IsJSObject()) { 347 } else if (object->IsJSObject()) {
346 if (object->IsCallable()) return UNCHANGED;
347 // Go to slow path for global proxy and objects requiring access checks. 348 // Go to slow path for global proxy and objects requiring access checks.
348 if (object->IsAccessCheckNeeded() || object->IsJSGlobalProxy()) break; 349 if (object->IsAccessCheckNeeded() || object->IsJSGlobalProxy()) break;
349 if (deferred_string_key) SerializeDeferredKey(comma, key); 350 if (deferred_string_key) SerializeDeferredKey(comma, key);
350 return SerializeJSObject(Handle<JSObject>::cast(object)); 351 return SerializeJSObject(Handle<JSObject>::cast(object));
351 } 352 }
352 } 353 }
353 354
354 return SerializeGeneric(object, key, comma, deferred_string_key); 355 return SerializeGeneric(object, key, comma, deferred_string_key);
355 } 356 }
356 357
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 } else { 680 } else {
680 SerializeString_<uc16, uc16>(object); 681 SerializeString_<uc16, uc16>(object);
681 } 682 }
682 } 683 }
683 } 684 }
684 685
685 } // namespace internal 686 } // namespace internal
686 } // namespace v8 687 } // namespace v8
687 688
688 #endif // V8_JSON_STRINGIFIER_H_ 689 #endif // V8_JSON_STRINGIFIER_H_
OLDNEW
« no previous file with comments | « src/js/v8natives.js ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698