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

Side by Side Diff: src/objects-inl.h

Issue 235943007: Handlify Object::ToObject. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 8 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/objects.cc ('k') | src/runtime.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 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 double value = HeapNumber::cast(this)->value(); 1070 double value = HeapNumber::cast(this)->value();
1071 int int_value = FastD2I(value); 1071 int int_value = FastD2I(value);
1072 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) { 1072 if (value == FastI2D(int_value) && Smi::IsValid(int_value)) {
1073 return Smi::FromInt(int_value); 1073 return Smi::FromInt(int_value);
1074 } 1074 }
1075 } 1075 }
1076 return Failure::Exception(); 1076 return Failure::Exception();
1077 } 1077 }
1078 1078
1079 1079
1080 MaybeHandle<JSReceiver> Object::ToObject(Isolate* isolate,
1081 Handle<Object> object) {
1082 return ToObject(
1083 isolate, object, handle(isolate->context()->native_context(), isolate));
1084 }
1085
1086
1080 bool Object::HasSpecificClassOf(String* name) { 1087 bool Object::HasSpecificClassOf(String* name) {
1081 return this->IsJSObject() && (JSObject::cast(this)->class_name() == name); 1088 return this->IsJSObject() && (JSObject::cast(this)->class_name() == name);
1082 } 1089 }
1083 1090
1084 1091
1085 MaybeHandle<Object> Object::GetProperty(Handle<Object> object, 1092 MaybeHandle<Object> Object::GetProperty(Handle<Object> object,
1086 Handle<Name> name) { 1093 Handle<Name> name) {
1087 PropertyAttributes attributes; 1094 PropertyAttributes attributes;
1088 return GetPropertyWithReceiver(object, object, name, &attributes); 1095 return GetPropertyWithReceiver(object, object, name, &attributes);
1089 } 1096 }
(...skipping 6014 matching lines...) Expand 10 before | Expand all | Expand 10 after
7104 #undef READ_SHORT_FIELD 7111 #undef READ_SHORT_FIELD
7105 #undef WRITE_SHORT_FIELD 7112 #undef WRITE_SHORT_FIELD
7106 #undef READ_BYTE_FIELD 7113 #undef READ_BYTE_FIELD
7107 #undef WRITE_BYTE_FIELD 7114 #undef WRITE_BYTE_FIELD
7108 #undef NOBARRIER_READ_BYTE_FIELD 7115 #undef NOBARRIER_READ_BYTE_FIELD
7109 #undef NOBARRIER_WRITE_BYTE_FIELD 7116 #undef NOBARRIER_WRITE_BYTE_FIELD
7110 7117
7111 } } // namespace v8::internal 7118 } } // namespace v8::internal
7112 7119
7113 #endif // V8_OBJECTS_INL_H_ 7120 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698