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

Side by Side Diff: src/accessors.cc

Issue 237963016: Revert "Implement structural function and array types" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/arm/stub-cache-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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Handle<String> name, 119 Handle<String> name,
120 int* object_offset) { 120 int* object_offset) {
121 Isolate* isolate = name->GetIsolate(); 121 Isolate* isolate = name->GetIsolate();
122 122
123 if (type->Is(T::String())) { 123 if (type->Is(T::String())) {
124 return CheckForName(name, isolate->factory()->length_string(), 124 return CheckForName(name, isolate->factory()->length_string(),
125 String::kLengthOffset, object_offset); 125 String::kLengthOffset, object_offset);
126 } 126 }
127 127
128 if (!type->IsClass()) return false; 128 if (!type->IsClass()) return false;
129 Handle<Map> map = type->AsClass()->Map(); 129 Handle<Map> map = type->AsClass();
130 130
131 switch (map->instance_type()) { 131 switch (map->instance_type()) {
132 case JS_ARRAY_TYPE: 132 case JS_ARRAY_TYPE:
133 return 133 return
134 CheckForName(name, isolate->factory()->length_string(), 134 CheckForName(name, isolate->factory()->length_string(),
135 JSArray::kLengthOffset, object_offset); 135 JSArray::kLengthOffset, object_offset);
136 case JS_TYPED_ARRAY_TYPE: 136 case JS_TYPED_ARRAY_TYPE:
137 return 137 return
138 CheckForName(name, isolate->factory()->length_string(), 138 CheckForName(name, isolate->factory()->length_string(),
139 JSTypedArray::kLengthOffset, object_offset) || 139 JSTypedArray::kLengthOffset, object_offset) ||
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 info->set_data(Smi::FromInt(index)); 1205 info->set_data(Smi::FromInt(index));
1206 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1206 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1207 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1207 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1208 info->set_getter(*getter); 1208 info->set_getter(*getter);
1209 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1209 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1210 return info; 1210 return info;
1211 } 1211 }
1212 1212
1213 1213
1214 } } // namespace v8::internal 1214 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698