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

Side by Side Diff: src/bootstrapper.cc

Issue 618002: Introduce Array.splice builtin. (Closed)
Patch Set: Proper restore Created 10 years, 10 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
« no previous file with comments | « src/array.js ('k') | src/builtins.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 AddSpecialFunction(special_prototype, "pop", 1491 AddSpecialFunction(special_prototype, "pop",
1492 Handle<Code>(Builtins::builtin(Builtins::ArrayPop))); 1492 Handle<Code>(Builtins::builtin(Builtins::ArrayPop)));
1493 AddSpecialFunction(special_prototype, "push", 1493 AddSpecialFunction(special_prototype, "push",
1494 Handle<Code>(Builtins::builtin(Builtins::ArrayPush))); 1494 Handle<Code>(Builtins::builtin(Builtins::ArrayPush)));
1495 AddSpecialFunction(special_prototype, "shift", 1495 AddSpecialFunction(special_prototype, "shift",
1496 Handle<Code>(Builtins::builtin(Builtins::ArrayShift))); 1496 Handle<Code>(Builtins::builtin(Builtins::ArrayShift)));
1497 AddSpecialFunction(special_prototype, "unshift", 1497 AddSpecialFunction(special_prototype, "unshift",
1498 Handle<Code>(Builtins::builtin(Builtins::ArrayUnshift))); 1498 Handle<Code>(Builtins::builtin(Builtins::ArrayUnshift)));
1499 AddSpecialFunction(special_prototype, "slice", 1499 AddSpecialFunction(special_prototype, "slice",
1500 Handle<Code>(Builtins::builtin(Builtins::ArraySlice))); 1500 Handle<Code>(Builtins::builtin(Builtins::ArraySlice)));
1501 AddSpecialFunction(special_prototype, "splice",
1502 Handle<Code>(Builtins::builtin(Builtins::ArraySplice)));
1501 } 1503 }
1502 1504
1503 1505
1504 Genesis::Genesis(Handle<Object> global_object, 1506 Genesis::Genesis(Handle<Object> global_object,
1505 v8::Handle<v8::ObjectTemplate> global_template, 1507 v8::Handle<v8::ObjectTemplate> global_template,
1506 v8::ExtensionConfiguration* extensions) { 1508 v8::ExtensionConfiguration* extensions) {
1507 // Link this genesis object into the stacked genesis chain. This 1509 // Link this genesis object into the stacked genesis chain. This
1508 // must be done before any early exits because the destructor 1510 // must be done before any early exits because the destructor
1509 // will always do unlinking. 1511 // will always do unlinking.
1510 previous_ = current_; 1512 previous_ = current_;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1576 } 1578 }
1577 1579
1578 1580
1579 // Restore statics that are thread local. 1581 // Restore statics that are thread local.
1580 char* Genesis::RestoreState(char* from) { 1582 char* Genesis::RestoreState(char* from) {
1581 current_ = *reinterpret_cast<Genesis**>(from); 1583 current_ = *reinterpret_cast<Genesis**>(from);
1582 return from + sizeof(current_); 1584 return from + sizeof(current_);
1583 } 1585 }
1584 1586
1585 } } // namespace v8::internal 1587 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/array.js ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698