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

Side by Side Diff: src/api.cc

Issue 12957004: ES6 symbols: turn symbols into a proper primitive type (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/arm/builtins-arm.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3179 matching lines...) Expand 10 before | Expand all | Expand 10 after
3190 Local<String> v8::Object::ObjectProtoToString() { 3190 Local<String> v8::Object::ObjectProtoToString() {
3191 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 3191 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
3192 ON_BAILOUT(isolate, "v8::Object::ObjectProtoToString()", 3192 ON_BAILOUT(isolate, "v8::Object::ObjectProtoToString()",
3193 return Local<v8::String>()); 3193 return Local<v8::String>());
3194 ENTER_V8(isolate); 3194 ENTER_V8(isolate);
3195 i::Handle<i::JSObject> self = Utils::OpenHandle(this); 3195 i::Handle<i::JSObject> self = Utils::OpenHandle(this);
3196 3196
3197 i::Handle<i::Object> name(self->class_name(), isolate); 3197 i::Handle<i::Object> name(self->class_name(), isolate);
3198 3198
3199 // Native implementation of Object.prototype.toString (v8natives.js): 3199 // Native implementation of Object.prototype.toString (v8natives.js):
3200 // var c = %ClassOf(this); 3200 // var c = %_ClassOf(this);
3201 // if (c === 'Arguments') c = 'Object'; 3201 // if (c === 'Arguments') c = 'Object';
3202 // return "[object " + c + "]"; 3202 // return "[object " + c + "]";
3203 3203
3204 if (!name->IsString()) { 3204 if (!name->IsString()) {
3205 return v8::String::New("[object ]"); 3205 return v8::String::New("[object ]");
3206 3206
3207 } else { 3207 } else {
3208 i::Handle<i::String> class_name = i::Handle<i::String>::cast(name); 3208 i::Handle<i::String> class_name = i::Handle<i::String>::cast(name);
3209 if (class_name->IsOneByteEqualTo(STATIC_ASCII_VECTOR("Arguments"))) { 3209 if (class_name->IsOneByteEqualTo(STATIC_ASCII_VECTOR("Arguments"))) {
3210 return v8::String::New("[object Object]"); 3210 return v8::String::New("[object Object]");
(...skipping 4002 matching lines...) Expand 10 before | Expand all | Expand 10 after
7213 7213
7214 v->VisitPointers(blocks_.first(), first_block_limit_); 7214 v->VisitPointers(blocks_.first(), first_block_limit_);
7215 7215
7216 for (int i = 1; i < blocks_.length(); i++) { 7216 for (int i = 1; i < blocks_.length(); i++) {
7217 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); 7217 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]);
7218 } 7218 }
7219 } 7219 }
7220 7220
7221 7221
7222 } } // namespace v8::internal 7222 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698