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

Side by Side Diff: src/d8.cc

Issue 12494010: Unbreak readline support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/d8.h ('k') | src/d8-readline.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 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 } 1490 }
1491 1491
1492 1492
1493 void Shell::RunShell(Isolate* isolate) { 1493 void Shell::RunShell(Isolate* isolate) {
1494 Locker locker(isolate); 1494 Locker locker(isolate);
1495 Context::Scope context_scope(evaluation_context_); 1495 Context::Scope context_scope(evaluation_context_);
1496 HandleScope outer_scope; 1496 HandleScope outer_scope;
1497 Handle<String> name = String::New("(d8)"); 1497 Handle<String> name = String::New("(d8)");
1498 LineEditor* console = LineEditor::Get(); 1498 LineEditor* console = LineEditor::Get();
1499 printf("V8 version %s [console: %s]\n", V8::GetVersion(), console->name()); 1499 printf("V8 version %s [console: %s]\n", V8::GetVersion(), console->name());
1500 console->Open(); 1500 console->Open(isolate);
1501 while (true) { 1501 while (true) {
1502 HandleScope inner_scope; 1502 HandleScope inner_scope;
1503 Handle<String> input = console->Prompt(Shell::kPrompt); 1503 Handle<String> input = console->Prompt(Shell::kPrompt);
1504 if (input.IsEmpty()) break; 1504 if (input.IsEmpty()) break;
1505 ExecuteString(input, name, true, true); 1505 ExecuteString(input, name, true, true);
1506 } 1506 }
1507 printf("\n"); 1507 printf("\n");
1508 } 1508 }
1509 1509
1510 1510
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 } 1962 }
1963 1963
1964 } // namespace v8 1964 } // namespace v8
1965 1965
1966 1966
1967 #ifndef GOOGLE3 1967 #ifndef GOOGLE3
1968 int main(int argc, char* argv[]) { 1968 int main(int argc, char* argv[]) {
1969 return v8::Shell::Main(argc, argv); 1969 return v8::Shell::Main(argc, argv);
1970 } 1970 }
1971 #endif 1971 #endif
OLDNEW
« no previous file with comments | « src/d8.h ('k') | src/d8-readline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698