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

Side by Side Diff: src/runtime/runtime.cc

Issue 618213002: Reland "Use symbols instead of hidden properties for i18n markers." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 2 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 | « src/runtime/runtime.h ('k') | src/runtime/runtime-i18n.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 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 ASSIGN_RETURN_ON_EXCEPTION(isolate, converted, 1033 ASSIGN_RETURN_ON_EXCEPTION(isolate, converted,
1034 Execution::ToString(isolate, key), Object); 1034 Execution::ToString(isolate, key), Object);
1035 name = Handle<String>::cast(converted); 1035 name = Handle<String>::cast(converted);
1036 } 1036 }
1037 1037
1038 if (name->IsString()) name = String::Flatten(Handle<String>::cast(name)); 1038 if (name->IsString()) name = String::Flatten(Handle<String>::cast(name));
1039 return JSReceiver::DeleteProperty(receiver, name, mode); 1039 return JSReceiver::DeleteProperty(receiver, name, mode);
1040 } 1040 }
1041 1041
1042 1042
1043 RUNTIME_FUNCTION(Runtime_SetHiddenProperty) {
1044 HandleScope scope(isolate);
1045 RUNTIME_ASSERT(args.length() == 3);
1046
1047 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
1048 CONVERT_ARG_HANDLE_CHECKED(String, key, 1);
1049 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
1050 RUNTIME_ASSERT(key->IsUniqueName());
1051 return *JSObject::SetHiddenProperty(object, key, value);
1052 }
1053
1054
1055 RUNTIME_FUNCTION(Runtime_AddNamedProperty) { 1043 RUNTIME_FUNCTION(Runtime_AddNamedProperty) {
1056 HandleScope scope(isolate); 1044 HandleScope scope(isolate);
1057 RUNTIME_ASSERT(args.length() == 4); 1045 RUNTIME_ASSERT(args.length() == 4);
1058 1046
1059 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); 1047 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
1060 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1); 1048 CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
1061 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); 1049 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
1062 CONVERT_SMI_ARG_CHECKED(unchecked_attributes, 3); 1050 CONVERT_SMI_ARG_CHECKED(unchecked_attributes, 3);
1063 RUNTIME_ASSERT( 1051 RUNTIME_ASSERT(
1064 (unchecked_attributes & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0); 1052 (unchecked_attributes & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
(...skipping 2369 matching lines...) Expand 10 before | Expand all | Expand 10 after
3434 } 3422 }
3435 return NULL; 3423 return NULL;
3436 } 3424 }
3437 3425
3438 3426
3439 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 3427 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
3440 return &(kIntrinsicFunctions[static_cast<int>(id)]); 3428 return &(kIntrinsicFunctions[static_cast<int>(id)]);
3441 } 3429 }
3442 } 3430 }
3443 } // namespace v8::internal 3431 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698