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

Side by Side Diff: src/accessors.cc

Issue 181113008: Revert "Remove Script::SetData and the script_data parameter from Script::(Compile|New)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « src/accessors.h ('k') | src/api.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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 345
346 const AccessorDescriptor Accessors::ScriptColumnOffset = { 346 const AccessorDescriptor Accessors::ScriptColumnOffset = {
347 ScriptGetColumnOffset, 347 ScriptGetColumnOffset,
348 IllegalSetter, 348 IllegalSetter,
349 0 349 0
350 }; 350 };
351 351
352 352
353 // 353 //
354 // Accessors::ScriptData
355 //
356
357
358 MaybeObject* Accessors::ScriptGetData(Isolate* isolate,
359 Object* object,
360 void*) {
361 Object* script = JSValue::cast(object)->value();
362 return Script::cast(script)->data();
363 }
364
365
366 const AccessorDescriptor Accessors::ScriptData = {
367 ScriptGetData,
368 IllegalSetter,
369 0
370 };
371
372
373 //
354 // Accessors::ScriptType 374 // Accessors::ScriptType
355 // 375 //
356 376
357 377
358 MaybeObject* Accessors::ScriptGetType(Isolate* isolate, 378 MaybeObject* Accessors::ScriptGetType(Isolate* isolate,
359 Object* object, 379 Object* object,
360 void*) { 380 void*) {
361 Object* script = JSValue::cast(object)->value(); 381 Object* script = JSValue::cast(object)->value();
362 return Script::cast(script)->type(); 382 return Script::cast(script)->type();
363 } 383 }
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 info->set_data(Smi::FromInt(index)); 988 info->set_data(Smi::FromInt(index));
969 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 989 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
970 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 990 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
971 info->set_getter(*getter); 991 info->set_getter(*getter);
972 if (!(attributes & ReadOnly)) info->set_setter(*setter); 992 if (!(attributes & ReadOnly)) info->set_setter(*setter);
973 return info; 993 return info;
974 } 994 }
975 995
976 996
977 } } // namespace v8::internal 997 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/accessors.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698