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/accessors.cc

Issue 228263005: Implement structural function and array types (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixing Windows compilation 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(); 129 Handle<Map> map = type->AsClass()->Map();
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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 info->set_data(Smi::FromInt(index)); 1090 info->set_data(Smi::FromInt(index));
1091 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1091 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1092 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1092 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1093 info->set_getter(*getter); 1093 info->set_getter(*getter);
1094 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1094 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1095 return info; 1095 return info;
1096 } 1096 }
1097 1097
1098 1098
1099 } } // namespace v8::internal 1099 } } // 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