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

Side by Side Diff: src/bootstrapper.cc

Issue 604059: Introduce builtin for Array.slice function. (Closed)
Patch Set: Next round 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 | « no previous file | 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 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 special_prototype = visible_prototype; 1489 special_prototype = visible_prototype;
1490 } 1490 }
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",
1500 Handle<Code>(Builtins::builtin(Builtins::ArraySlice)));
1499 } 1501 }
1500 1502
1501 1503
1502 Genesis::Genesis(Handle<Object> global_object, 1504 Genesis::Genesis(Handle<Object> global_object,
1503 v8::Handle<v8::ObjectTemplate> global_template, 1505 v8::Handle<v8::ObjectTemplate> global_template,
1504 v8::ExtensionConfiguration* extensions) { 1506 v8::ExtensionConfiguration* extensions) {
1505 // Link this genesis object into the stacked genesis chain. This 1507 // Link this genesis object into the stacked genesis chain. This
1506 // must be done before any early exits because the destructor 1508 // must be done before any early exits because the destructor
1507 // will always do unlinking. 1509 // will always do unlinking.
1508 previous_ = current_; 1510 previous_ = current_;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 } 1576 }
1575 1577
1576 1578
1577 // Restore statics that are thread local. 1579 // Restore statics that are thread local.
1578 char* Genesis::RestoreState(char* from) { 1580 char* Genesis::RestoreState(char* from) {
1579 current_ = *reinterpret_cast<Genesis**>(from); 1581 current_ = *reinterpret_cast<Genesis**>(from);
1580 return from + sizeof(current_); 1582 return from + sizeof(current_);
1581 } 1583 }
1582 1584
1583 } } // namespace v8::internal 1585 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698