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

Unified Diff: src/extensions/i18n/i18n-extension.cc

Issue 23414008: Revert "Snapshot i18n Javascript code" and "Fix mjsunit/debug-script after r16298". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/extensions/i18n/i18n-extension.h ('k') | src/extensions/i18n/i18n-utils.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/i18n-extension.cc
diff --git a/test/mjsunit/compiler/regress-shared-deopt.js b/src/extensions/i18n/i18n-extension.cc
similarity index 73%
copy from test/mjsunit/compiler/regress-shared-deopt.js
copy to src/extensions/i18n/i18n-extension.cc
index 669e0e2f1de385214c3033b01924cc55d15e55e7..b5f28631e1f9b966ccb1ecc59f68b93498518dd1 100644
--- a/test/mjsunit/compiler/regress-shared-deopt.js
+++ b/src/extensions/i18n/i18n-extension.cc
@@ -24,42 +24,28 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// limitations under the License.
-// Flags: --allow-natives-syntax
+#include "i18n-extension.h"
-var soft = false;
+#include "natives.h"
-// disable optimization of this global
-soft = true;
-soft = false;
-soft = true;
-soft = false;
+using v8::internal::I18NNatives;
-function test() {
- var f4 = makeF(4);
- var f5 = makeF(5);
+namespace v8_i18n {
- function makeF(i) {
- return function f(x) {
- if (x == 0) return i;
- if (i == 4) if (soft) print("wahoo" + i);
- return f4(x - 1);
- }
- }
+Extension::Extension()
+ : v8::Extension("v8/i18n",
+ reinterpret_cast<const char*>(
+ I18NNatives::GetScriptsSource().start()),
+ 0,
+ 0,
+ I18NNatives::GetScriptsSource().length()) {}
- f4(9);
- f4(11);
- %OptimizeFunctionOnNextCall(f4);
- f4(12);
- f5(9);
- f5(11);
- %OptimizeFunctionOnNextCall(f5);
- f5(12);
-
- soft = true;
- f4(1);
- f5(9);
+void Extension::Register() {
+ static Extension i18n_extension;
+ static v8::DeclareExtension extension_declaration(&i18n_extension);
}
-test();
+} // namespace v8_i18n
« no previous file with comments | « src/extensions/i18n/i18n-extension.h ('k') | src/extensions/i18n/i18n-utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698